fix(colorjson): apply DisabledColor to keys as well

This commit is contained in:
AJ ONeal 2025-10-02 23:58:21 -06:00
parent 6e394bc15a
commit 045480f900
No known key found for this signature in database

View File

@ -100,7 +100,11 @@ func (f *Formatter) marshalMap(m map[string]interface{}, buf *bytes.Buffer, dept
for _, key := range keys {
f.writeIndent(buf, depth+1)
buf.WriteString(f.KeyColor.Sprintf("\"%s\": ", key))
if f.DisabledColor {
fmt.Fprintf(buf, "\"%s\": ", key)
} else {
buf.WriteString(f.KeyColor.Sprintf("\"%s\"", key) + ": ")
}
f.marshalValue(m[key], buf, depth+1)
remaining--
if remaining != 0 {