MCPcopy
hub / github.com/uber-go/zap / MarshalLogObject

Method MarshalLogObject

field_test.go:38–41  ·  view source on GitHub ↗
(enc zapcore.ObjectEncoder)

Source from the content-addressed store, hash-verified

36type username string
37
38func (n username) MarshalLogObject(enc zapcore.ObjectEncoder) error {
39 enc.AddString("username", string(n))
40 return nil
41}
42
43func assertCanBeReused(t testing.TB, field Field) {
44 var wg sync.WaitGroup

Callers

nothing calls this directly

Calls 1

AddStringMethod · 0.65

Tested by

no test coverage detected