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

Method MarshalLogObject

zapcore/field_test.go:45–51  ·  view source on GitHub ↗
(enc ObjectEncoder)

Source from the content-addressed store, hash-verified

43}
44
45func (u users) MarshalLogObject(enc ObjectEncoder) error {
46 if int(u) < 0 {
47 return errors.New("too few users")
48 }
49 enc.AddInt("users", int(u))
50 return nil
51}
52
53func (u users) MarshalLogArray(enc ArrayEncoder) error {
54 if int(u) < 0 {

Callers

nothing calls this directly

Calls 1

AddIntMethod · 0.65

Tested by

no test coverage detected