4 ms·
> The fact you can go from int to duration without specifying the unit The unit that is converted in, is in the first sentence of the two-sentence documentatio
by usrbinbash 5y ago
> The fact you can go from int to duration without specifying the unit
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 https://pkg.go.dev/time@go1.18#Duration
- conradludgate 5y agoYes, in the documentation. But if I'm reading the original code and refactoring, having the docs open might not be my top priority