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

Function Intp

field.go:158–163  ·  view source on GitHub ↗

Intp constructs a field that carries a *int. The returned Field will safely and explicitly represent `nil` when appropriate.

(key string, val *int)

Source from the content-addressed store, hash-verified

156// Intp constructs a field that carries a *int. The returned Field will safely
157// and explicitly represent `nil` when appropriate.
158func Intp(key string, val *int) Field {
159 if val == nil {
160 return nilField(key)
161 }
162 return Int(key, *val)
163}
164
165// Int64 constructs a field with the given key and value.
166func Int64(key string, val int64) Field {

Callers 1

TestFieldConstructorsFunction · 0.85

Calls 2

nilFieldFunction · 0.85
IntFunction · 0.85

Tested by 1

TestFieldConstructorsFunction · 0.68