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

Function Timep

field.go:356–361  ·  view source on GitHub ↗

Timep constructs a field that carries a *time.Time. The returned Field will safely and explicitly represent `nil` when appropriate.

(key string, val *time.Time)

Source from the content-addressed store, hash-verified

354// Timep constructs a field that carries a *time.Time. The returned Field will safely
355// and explicitly represent `nil` when appropriate.
356func Timep(key string, val *time.Time) Field {
357 if val == nil {
358 return nilField(key)
359 }
360 return Time(key, *val)
361}
362
363// Stack constructs a field that stores a stacktrace of the current goroutine
364// under provided key. Keep in mind that taking a stacktrace is eager and

Callers 1

TestFieldConstructorsFunction · 0.85

Calls 2

nilFieldFunction · 0.85
TimeFunction · 0.85

Tested by 1

TestFieldConstructorsFunction · 0.68