Skip to content

Commit 7de405e

Browse files
Added time.duration case to AppendIntf (#353)
Co-authored-by: Willem Adriaan Laubscher <[email protected]>
1 parent cde6e95 commit 7de405e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

msgp/write_bytes.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ func AppendIntf(b []byte, i interface{}) ([]byte, error) {
396396
return AppendUint64(b, i), nil
397397
case time.Time:
398398
return AppendTime(b, i), nil
399+
case time.Duration:
400+
return AppendDuration(b, i), nil
399401
case map[string]interface{}:
400402
return AppendMapStrIntf(b, i)
401403
case map[string]string:

0 commit comments

Comments
 (0)