tailscale/tstime
Joe Tsai aff8f1b358
tstime: add GoDuration which JSON serializes with time.Duration.String (#15726)
The encoding/json/v2 effort may end up changing
the default represention of time.Duration in JSON.
See https://go.dev/issue/71631

The GoDuration type allows us to explicitly use
the time.Duration.String representation regardless of
whether we serialize with v1 or v2 of encoding/json.

Updates tailscale/corp#27502

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2025-04-17 15:51:41 -07:00
..
mono all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
rate all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
jitter_test.go all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
jitter.go all: use math/rand/v2 more 2024-06-05 15:24:04 -07:00
tstime_test.go tstime: add GoDuration which JSON serializes with time.Duration.String (#15726) 2025-04-17 15:51:41 -07:00
tstime.go tstime: add GoDuration which JSON serializes with time.Duration.String (#15726) 2025-04-17 15:51:41 -07:00