Skip to content

Commit

Permalink
change name of ms encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
liudeen committed Jan 8, 2020
1 parent 9638af6 commit 1f89259
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zapcore/encoder.go
Expand Up @@ -168,9 +168,9 @@ func NanosDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
enc.AppendInt64(int64(d))
}

// MilliSecondsDurationEncoder serializes a time.Duration to an integer number of
// MillisDurationEncoder serializes a time.Duration to an integer number of
// milliseconds elapsed.
func MilliSecondsDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
func MillisDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
enc.AppendInt64(d.Nanoseconds() / 1e6)
}

Expand All @@ -190,7 +190,7 @@ func (e *DurationEncoder) UnmarshalText(text []byte) error {
case "nanos":
*e = NanosDurationEncoder
case "ms":
*e = MilliSecondsDurationEncoder
*e = MillisDurationEncoder
default:
*e = SecondsDurationEncoder
}
Expand Down

0 comments on commit 1f89259

Please sign in to comment.