This links in github.com/go-json-experiment/json into tailscaled.
After this change, the tailscaled binary on GOOS=linux and GOARCH=amd64
increases by ~85KiB.
The v2 marshal/unmarshal methods avoids a O(n^2) behavior
with deeply nested v1 MarshalJSON and UnmarshalJSON calls,
since each call requires the encoding/json package to rescan
the entire JSON value. Our data structures are not so deep
that the O(n^2) behavior becomes notable,
but this does provide about a ~20% performance benefit.
Updates tailscale/corp#14379
Signed-off-by: Joe Tsai <joetsai@digital-static.net>
Make it just a views.Slice[netip.Prefix] instead of its own named type.
Having the special case led to circular dependencies in another WIP PR
of mine.
Updates #8948
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
I noticed cmd/{cloner,viewer} didn't support structs with embedded
fields while working on a change in another repo. This adds support.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Update all code generation tools, and those that check for license
headers to use the new standard header.
Also update copyright statement in LICENSE file.
Fixes#6865
Signed-off-by: Will Norris <will@tailscale.com>
This updates all source files to use a new standard header for copyright
and license declaration. Notably, copyright no longer includes a date,
and we now use the standard SPDX-License-Identifier header.
This commit was done almost entirely mechanically with perl, and then
some minimal manual fixes.
Updates #6865
Signed-off-by: Will Norris <will@tailscale.com>