From f566d208fd0d021cad9dd573683b88ba01c1be4d Mon Sep 17 00:00:00 2001 From: John Wang Date: Sun, 12 Nov 2023 09:12:33 -0800 Subject: [PATCH] lint: golangci: resolve `unnecessary conversion (unconvert)` --- time/timeutil/duration_info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/time/timeutil/duration_info.go b/time/timeutil/duration_info.go index b002b06..b5c767d 100644 --- a/time/timeutil/duration_info.go +++ b/time/timeutil/duration_info.go @@ -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)) } if time.Duration(workingNanos) >= nanosPerDay { days := float64(workingNanos) / float64(Day)