From d2eaf272f067755fb3312fabe355b326f8ce8140 Mon Sep 17 00:00:00 2001 From: Paul Scott Date: Fri, 21 Mar 2025 12:33:26 +0000 Subject: [PATCH] tailcfg: change MapResponse.PacketFilter from omitempty to omitzero Updates #test --- tailcfg/tailcfg.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index 83fab9c97..bb04ff99f 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -1942,12 +1942,8 @@ type MapResponse struct { // the same HTTP response. A non-nil but empty list always means // no PacketFilter (that is, to block everything). // - // Note that this package's type, due its use of a slice and omitempty, is - // unable to marshal a zero-length non-nil slice. The control server needs - // to marshal this type using a separate type. See MapResponse docs. - // // See PacketFilters for the newer way to send PacketFilter updates. - PacketFilter []FilterRule `json:",omitempty"` + PacketFilter []FilterRule `json:",omitzero"` // PacketFilters encodes incremental packet filter updates to the client // without having to send the entire packet filter on any changes as