Skip to content

Commit b5e7d9f

Browse files
committedDec 8, 2023
funcr: Be consistent about quoted
1 parent 44c6ac8 commit b5e7d9f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎funcr/funcr.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
542542
name = fld.Name
543543
}
544544
// field names can't contain characters which need escaping
545-
buf.WriteByte('"')
546-
buf.WriteString(name)
547-
buf.WriteByte('"')
545+
buf.WriteString(f.quoted(name, false))
548546
buf.WriteByte(f.colon())
549547
buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1))
550548
}

0 commit comments

Comments
 (0)