We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26b53cc commit c9125d3Copy full SHA for c9125d3
zapcore/error.go
@@ -89,6 +89,8 @@ func encodeError(key string, err error, enc ObjectEncoder) (retErr error) {
89
90
switch {
91
case len(marshalers) == 1:
92
+ // Special-case handling of single marshaler to avoid an alloc
93
+ // converting mergedMarshalers to an ObjectMarshaler interface.
94
if err := enc.AddObject(key+"Fields", marshalers[0]); err != nil {
95
return err
96
}
0 commit comments