Skip to content

Commit

Permalink
not convert fmt.Stringer to time.Duration
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed May 13, 2024
1 parent ce714ed commit 3ba5ed2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions defaults_cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,6 @@ func toduration(src any) (dst time.Duration, err error) {
dst = *src
case interface{ Duration() time.Duration }:
dst = src.Duration()
case fmt.Stringer:
dst, err = parseDuration(src.String())
default:
err = fmt.Errorf("unsupport to convert %#T to time.Duration", src)
}
Expand Down

0 comments on commit 3ba5ed2

Please sign in to comment.