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

Function EpochNanosTimeEncoder

zapcore/encoder.go:119–121  ·  view source on GitHub ↗

EpochNanosTimeEncoder serializes a time.Time to an integer number of nanoseconds since the Unix epoch.

(t time.Time, enc PrimitiveArrayEncoder)

Source from the content-addressed store, hash-verified

117// EpochNanosTimeEncoder serializes a time.Time to an integer number of
118// nanoseconds since the Unix epoch.
119func EpochNanosTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) {
120 enc.AppendInt64(t.UnixNano())
121}
122
123func encodeTimeLayout(t time.Time, layout string, enc PrimitiveArrayEncoder) {
124 type appendTimeEncoder interface {

Callers

nothing calls this directly

Calls 1

AppendInt64Method · 0.65

Tested by

no test coverage detected