by conradludgate · 4y ago · 0 comments
The fact you can go from int to duration without specifying the unit does not give you the strong benefits. It's better than nothing though
The unit that is converted in, is in the first sentence of the two-sentence documentation of time.Duration():
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
https://pkg.go.dev/time@go1.18#Duration