-
This commit is contained in:
@ -45,3 +45,13 @@ func (d Duration) MarshalJSON() ([]byte, error) {
|
||||
func (d Duration) String() string {
|
||||
return d.Duration.String()
|
||||
}
|
||||
|
||||
// Int64 returns the duration in nanoseconds for validator compatibility
|
||||
func (d Duration) Int64() int64 {
|
||||
return int64(d.Duration)
|
||||
}
|
||||
|
||||
// IsZero returns true if the duration is zero
|
||||
func (d Duration) IsZero() bool {
|
||||
return d.Duration == 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user