We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd72e75 commit 5c2fd23Copy full SHA for 5c2fd23
cmd/root.go
@@ -33,8 +33,8 @@ var rootCmd = &cobra.Command{
33
return nil
34
}
35
36
- if seconds, err := strconv.Atoi(args[0]); err == nil {
37
- duration = time.Duration(seconds) * time.Second
+ if seconds, err := strconv.ParseFloat(args[0], 64); err == nil {
+ duration = time.Duration(seconds * float64(time.Second))
38
} else {
39
duration, err = time.ParseDuration(args[0])
40
if err != nil {
0 commit comments