Merge pull request #924 from trheyi/main
feat: Enhance getTimestamp function to support time.Time type
This commit is contained in:
commit
caa529dc58
1 changed files with 3 additions and 0 deletions
|
|
@ -33,6 +33,9 @@ func getTimestamp(v interface{}) (int64, error) {
|
||||||
return ts, nil
|
return ts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case time.Time:
|
||||||
|
return v.UnixNano(), nil
|
||||||
|
|
||||||
case nil:
|
case nil:
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue