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/wgengine
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
..
bench health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 3 months ago
filter all: apply consistent imports of "json" packages 4 weeks ago
magicsock wgengine/magicsock: fix js/wasm crash regression loading non-existent portmapper 1 month ago
netlog wgengine/netlog: include node OS in logged attributes (#17755) 1 month ago
netstack feature, net/tshttpproxy: pull out support for using proxies as a feature 2 months ago
router all: apply consistent imports of "json" packages 4 weeks ago
wgcfg util/checkchange: stop using deephash everywhere 2 months ago
wgint wgengine{,/wgint}: add wgint.Peer wrapper type, add to wgengine.Engine 2 years ago
wglog all: use Go 1.22 range-over-int 2 years ago
winnet all: add test for package comments, fix, add comments as needed 1 year ago
mem_ios.go all: update copyright and license headers 3 years ago
pendopen.go wgengine: stop importing flowtrack when unused 2 months ago
pendopen_omit.go wgengine: stop importing flowtrack when unused 2 months ago
userspace.go wgengine/netlog: embed node information in network flow logs (#17668) 1 month ago
userspace_ext_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 3 months ago
userspace_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 3 months ago
watchdog.go ipn/ipnlocal, engine: avoid runtime/pprof with two usages of ts_omit_debug 2 months ago
watchdog_omit.go ipn/ipnlocal, engine: avoid runtime/pprof with two usages of ts_omit_debug 2 months ago
watchdog_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 3 months ago
wgengine.go feature/capture: move packet capture to feature/*, out of iOS + CLI 10 months ago