From c81a54c5aa045d82f1d823e605843fbb2258d54d Mon Sep 17 00:00:00 2001 From: CreativeCactus <12624092+CreativeCactus@users.noreply.github.com> Date: Thu, 1 Oct 2020 17:36:44 +1000 Subject: [PATCH] Replace %v with %w for error https://golang.org/pkg/fmt/#Errorf --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5796706..5152b6a 100644 --- a/README.md +++ b/README.md @@ -402,7 +402,7 @@ func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) { // source of the official loggers. serialized, err := json.Marshal(entry.Data) if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) + return nil, fmt.Errorf("Failed to marshal fields to JSON, %w", err) } return append(serialized, '\n'), nil }