Skip to content

Commit

Permalink
Fix of JSON encoder (#6)
Browse files Browse the repository at this point in the history
Co-authored-by: Konstantin Zhernosenko <konstantin.zhernosenko@humans.net>
  • Loading branch information
kainobor and Konstantin Zhernosenko authored Feb 11, 2021
1 parent 285067f commit 8a452fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cimp/marshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (m *kvMarshaler) Marshal() ([]byte, error) {
err = yamlEncoder.Encode(m.kv.tree)
case JSONFormat:
jsonEncoder := json.NewEncoder(&rawBuf)
jsonEncoder.SetIndent("", strings.Repeat("", m.indentSpaces))
jsonEncoder.SetIndent("", strings.Repeat(" ", m.indentSpaces))
err = jsonEncoder.Encode(m.kv.tree)
default:
return nil, fmt.Errorf("unsupported marshal format: %v", m.format)
Expand Down

0 comments on commit 8a452fe

Please sign in to comment.