Skip to content

Commit

Permalink
Merge pull request #12 from ajholland/ajholland/timeHandling
Browse files Browse the repository at this point in the history
Ability to not specify unit in timeout
  • Loading branch information
zakird authored Jul 2, 2018
2 parents 73419db + 0592d13 commit a530177
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ func convert(val string, retval reflect.Value, options multiTag) error {
parsed, err := time.ParseDuration(val)

if err != nil {
return err
parsed, err = time.ParseDuration(val + "s")
if err != nil {
return err
}
}

retval.SetInt(int64(parsed))
Expand Down

0 comments on commit a530177

Please sign in to comment.