Skip to content

Commit

Permalink
Encoder.Encode must terminate encoded value with a newline
Browse files Browse the repository at this point in the history
  • Loading branch information
nwidger committed Feb 8, 2020
1 parent b785f71 commit 47a3e84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsoncolor.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func NewEncoder(w io.Writer) *Encoder {
// Encode is like encoding/json's Encoder.Encode but writes a
// colorized JSON encoding of v to the stream.
func (enc *Encoder) Encode(v interface{}) error {
return enc.encode(v, false)
return enc.encode(v, true)
}

// SetIndent is like encoding/json's Encoder.SetIndent.
Expand Down

0 comments on commit 47a3e84

Please sign in to comment.