Nick Khyl 4df02bbb48 util/syspolicy/setting: use a custom marshaler for time.Duration
jsonv2 now returns an error when you marshal or unmarshal a time.Duration
without an explicit format flag. This is an intentional, temporary choice until
the default [time.Duration] representation is decided (see golang/go#71631).

setting.Snapshot can hold time.Duration values inside a map[string]any,
so the jsonv2 update breaks marshaling. In this PR, we start using
a custom marshaler until that decision is made or golang/go#71664
lets us specify the format explicitly.

This fixes `tailscale syspolicy list` failing when KeyExpirationNotice
or any other time.Duration policy setting is configured.

Fixes #16683

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2025-07-28 12:57:39 -05:00
..
2024-06-05 15:24:04 -07:00
2023-03-04 12:24:55 -08:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00
2024-06-05 15:24:04 -07:00
2025-07-22 12:22:17 -07:00
2025-01-22 10:20:56 -08:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00