diff --git a/clock/duration.go b/clock/duration.go index 57a32281..7dc1ac7e 100644 --- a/clock/duration.go +++ b/clock/duration.go @@ -37,6 +37,14 @@ func NewDurationJSON(v interface{}) (DurationJSON, error) { } } +func NewDurationJSONOrPanic(v interface{}) DurationJSON { + d, err := NewDurationJSON(v) + if err != nil { + panic(err) + } + return d +} + func (d DurationJSON) MarshalJSON() ([]byte, error) { return json.Marshal(d.Duration.String()) } diff --git a/version b/version index 7ec1d6db..3e3c2f1e 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.1.0 +2.1.1