Skip to content

Commit

Permalink
Address lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
falfaroc committed Oct 7, 2024
1 parent 688ccd1 commit 6239d85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ func ValidateDuration(durationStr string) (uint64, error) {
if minutes >= 60 || minutes < 0 || secs >= 60 || secs < 0 {
return 0, errors.New("hours, minutes and seconds should be in between 0-60")
}

// #nosec G115
seconds := uint64(days*24*60*60 + hours*60*60 + minutes*60 + secs)
return seconds, nil
}
Expand Down

0 comments on commit 6239d85

Please sign in to comment.