Skip to content

Commit

Permalink
lint: golangci: resolve unnecessary conversion (unconvert)
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Nov 12, 2023
1 parent 0d86a18 commit f566d20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion time/timeutil/duration_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewDurationInfo(d time.Duration, daysPerWeek, hoursPerDay float32) Duration
}
nanosPerDay := Day
if hoursPerDay != 0 {
nanosPerDay = time.Duration(int64(float32(hoursPerDay) * float32(time.Hour)))
nanosPerDay = time.Duration(float32(hoursPerDay) * float32(time.Hour))

Check failure on line 51 in time/timeutil/duration_info.go

View workflow job for this annotation

GitHub Actions / lint (1.x, ubuntu-latest)

unnecessary conversion (unconvert)
}
if time.Duration(workingNanos) >= nanosPerDay {
days := float64(workingNanos) / float64(Day)
Expand Down

0 comments on commit f566d20

Please sign in to comment.