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

Function Str

exp/zapfield/zapfield.go:30–32  ·  exp/zapfield/zapfield.go::Str

Str constructs a field with the given string-like key and value.

(k K, v V)

Source from the content-addressed store, hash-verified

28
29// Str constructs a field with the given string-like key and value.
30func Str[K ~string, V ~string](k K, v V) zap.Field {
31 return zap.String(string(k), string(v))
32}
33
34type stringArray[T ~string] []T
35

Callers 1

TestFieldConstructorsFunction · 0.85

Calls 1

StringFunction · 0.92

Tested by 1

TestFieldConstructorsFunction · 0.68