From ab482118ad7e04bcf871fffec0f880fe44429b5d Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 25 Nov 2020 10:27:01 -0800 Subject: [PATCH] tailcfg: add some missing json omitempty Noticed these in MapResponses to clients. MachineAuthorized was set true, but once we fix the coordination server to zero out that field, then it can be omittted. --- tailcfg/tailcfg.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index 466567e8a..d766a55b3 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -151,9 +151,9 @@ type Node struct { Created time.Time LastSeen *time.Time `json:",omitempty"` - KeepAlive bool // open and keep open a connection to this peer + KeepAlive bool `json:",omitempty"` // open and keep open a connection to this peer - MachineAuthorized bool // TODO(crawshaw): replace with MachineStatus + MachineAuthorized bool `json:",omitempty"` // TODO(crawshaw): replace with MachineStatus } type MachineStatus int @@ -279,7 +279,7 @@ type Service struct { type Hostinfo struct { // TODO(crawshaw): mark all these fields ",omitempty" when all the // iOS apps are updated with the latest swift version of this struct. - IPNVersion string // version of this code + IPNVersion string `json:",omitempty"` // version of this code FrontendLogID string `json:",omitempty"` // logtail ID of frontend instance BackendLogID string `json:",omitempty"` // logtail ID of backend instance OS string // operating system the client runs on (a version.OS value)