Merge pull request #901 from CodeLingoBot/rewrite

Fix error formatting based on best practices from Code Review Comments
This commit is contained in:
Sébastien Lavoie 2019-03-11 10:33:21 -04:00 committed by GitHub
commit 131eba2470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
encoder.SetIndent("", " ") encoder.SetIndent("", " ")
} }
if err := encoder.Encode(data); err != nil { if err := encoder.Encode(data); err != nil {
return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) return nil, fmt.Errorf("failed to marshal fields to JSON, %v", err)
} }
return b.Bytes(), nil return b.Bytes(), nil