You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd
Joe Tsai c299a96624 all: apply consistent imports of "json" packages
This runs:

        go run ./cmd/jsonimports -update -ignore=tempfork/

which applies the following rules:

  * Until the Go standard library formally accepts "encoding/json/v2"
    and "encoding/json/jsontext" into the standard library
    (i.e., they are no longer considered experimental),
    we forbid any code from directly importing those packages.
    Go code should instead import "github.com/go-json-experiment/json"
    and "github.com/go-json-experiment/json/jsontext".
    The latter packages contain aliases to the standard library
    if built on Go 1.25 with the goexperiment.jsonv2 tag specified.

  * Imports of "encoding/json" or "github.com/go-json-experiment/json/v1"
    must be explicitly imported under the package name "jsonv1".
    If both packages need to be imported, then
    the former should be imported under the package name "jsonv1std".

  * Imports of "github.com/go-json-experiment/json"
    must be explicitly imported under the package name "jsonv2".

The latter two rules exist to provide clarity when reading code.
Without them, it is unclear whether "json.Marshal" refers to v1 or v2.
With them, however, it is clear that "jsonv1.Marshal" is calling v1 and
that "jsonv2.Marshal" is calling v2.

Updates tailscale/corp#791

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
4 weeks ago
..
addlicense all: fix golangci-lint errors 11 months ago
build-webclient client/web: precompress assets 2 years ago
checkmetrics cmd/checkmetrics: add command for checking metrics against kb 1 year ago
cloner types/persist: add AttestationKey (#17281) 2 months ago
connector-gen all: apply consistent imports of "json" packages 4 weeks ago
containerboot all: apply consistent imports of "json" packages 4 weeks ago
derper all: apply consistent imports of "json" packages 4 weeks ago
derpprobe cmd/derpprobe,prober: add run all probes handler (#16875) 4 months ago
dist {cmd/dist,release/dist}: add support for intermediary QNAP signing certificates 4 months ago
featuretags feature/featuretags,cmd/omitsize: support feature dependencies 3 months ago
get-authkey cmd,tsnet,internal/client: create internal shim to deprecated control plane API 10 months ago
gitops-pusher all: apply consistent imports of "json" packages 4 weeks ago
hello all: apply consistent imports of "json" packages 4 weeks ago
jsonimports all: apply consistent imports of "json" packages 4 weeks ago
jsontags cmd/jsontags: add static analyzer for incompatible `json` struct tags (#17670) 1 month ago
k8s-nameserver all: apply consistent imports of "json" packages 4 weeks ago
k8s-operator all: apply consistent imports of "json" packages 4 weeks ago
k8s-proxy cmd/k8s-proxy: switching to using ipn/store/kubestore (#17402) 2 months ago
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 3 years ago
mkpkg go.mod: upgrade nfpm to v2 (#8786) 2 years ago
mkversion version/mkversion: open-source version generation logic 3 years ago
nardump cmd/nardump: support symlinks, add basic test 8 months ago
natc all: apply consistent imports of "json" packages 4 weeks ago
netlogfmt all: apply consistent imports of "json" packages 4 weeks ago
nginx-auth tailcfg,all: add and use Node.IsTagged() 3 years ago
omitsize feature/featuretags,cmd/omitsize: support feature dependencies 3 months ago
pgproxy all: use new LocalAPI client package location 10 months ago
printdep cmd/printdep: print correct toolchain URL 3 years ago
proxy-test-server net/tlsdial: fix TLS cert validation of HTTPS proxies 6 months ago
proxy-to-grafana scripts/check_license_headers.sh: delete, rewrite as a Go test 6 months ago
sniproxy all: apply consistent imports of "json" packages 4 weeks ago
speedtest all: update copyright and license headers 3 years ago
ssh-auth-none-demo ssh,tempfork/gliderlabs/ssh: replace github.com/tailscale/golang-x-crypto/ssh with golang.org/x/crypto/ssh 10 months ago
stunc cmd/stunc: enforce read timeout deadline (#14309) 1 year ago
stund types/persist: add AttestationKey (#17281) 2 months ago
stunstamp all: apply consistent imports of "json" packages 4 weeks ago
sync-containers all: adjust some build tags for plan9 2 years ago
systray client/systray: allow specifying tailscaled socket 4 months ago
tailscale all: apply consistent imports of "json" packages 4 weeks ago
tailscaled all: apply consistent imports of "json" packages 4 weeks ago
testcontrol all: use Go 1.22 range-over-int 2 years ago
testwrapper all: apply consistent imports of "json" packages 4 weeks ago
tl-longchain all: use new LocalAPI client package location 10 months ago
tsconnect all: apply consistent imports of "json" packages 4 weeks ago
tsidp all: apply consistent imports of "json" packages 4 weeks ago
tsshd all: update copyright and license headers 3 years ago
tta all: use new LocalAPI client package location 10 months ago
viewer cmd/viewer: add field comments to generated view methods 3 months ago
vnet cmd/vnet: add wsproxy mode 8 months ago
xdpderper tsweb: split promvarz into an optional dependency 9 months ago