mirror of
https://github.com/tailscale/tailscale.git
synced 2026-01-04 17:43:13 +00:00
all: specify explicit JSON format for time.Duration (#17307)
The default representation of time.Duration has different JSON representation between v1 and v2. Apply an explicit format flag that uses the v1 representation so that this behavior does not change if serialized with v2. Updates tailscale/corp#791 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
@@ -24,7 +24,7 @@ const (
|
||||
// conduct the test.
|
||||
type config struct {
|
||||
Version int `json:"version"`
|
||||
TestDuration time.Duration `json:"time"`
|
||||
TestDuration time.Duration `json:"time,format:nano"`
|
||||
Direction Direction `json:"direction"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user