Skip to content

Commit

Permalink
add func DictObject
Browse files Browse the repository at this point in the history
  • Loading branch information
MayCXC authored Aug 15, 2024
1 parent 3f27eb9 commit c0a635e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions field.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ func (d dictObject) MarshalLogObject(enc zapcore.ObjectEncoder) error {
return nil
}

func DictObject(val ...Field) zapcore.ObjectMarshaler {

Check failure on line 434 in field.go

View workflow job for this annotation

GitHub Actions / Lint

exported: exported function DictObject should have comment or be unexported (revive)
return dictObject(val)
}

// We discovered an issue where zap.Any can cause a performance degradation
// when used in new goroutines.
//
Expand Down

0 comments on commit c0a635e

Please sign in to comment.