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/net/netmon
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>
1 month ago
..
defaultroute_bsd.go net/netmon: swap to swift-derived defaultRoute on macos (#11936) 2 years ago
defaultroute_darwin.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 4 months ago
interfaces_android.go types/result, util/lineiter: add package for a result type, use it 1 year ago
interfaces_bsd.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_darwin.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_darwin_test.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 4 months ago
interfaces_default_route_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_defaultrouteif_todo.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_freebsd.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_linux.go feature/featuretags: add features for c2n, peerapi, advertise/use routes/exit nodes 2 months ago
interfaces_linux_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_test.go all: apply consistent imports of "json" packages 1 month ago
interfaces_windows.go feature, net/tshttpproxy: pull out support for using proxies as a feature 2 months ago
interfaces_windows_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
loghelper.go net/netmon: remove usage of direct callbacks from netmon (#17292) 2 months ago
loghelper_test.go net/netmon: remove usage of direct callbacks from netmon (#17292) 2 months ago
netmon.go all: apply consistent imports of "json" packages 1 month ago
netmon_darwin.go net/netmon: publish events to event bus 8 months ago
netmon_darwin_test.go all: move network monitoring from wgengine/monitor to net/netmon 3 years ago
netmon_freebsd.go net/netmon: publish events to event bus 8 months ago
netmon_linux.go wgengine/router: rely on events for deleted IP rules (#16744) 4 months ago
netmon_linux_test.go types/result, util/lineiter: add package for a result type, use it 1 year ago
netmon_polling.go net/netmon: publish events to event bus 8 months ago
netmon_test.go util/eventbus/eventbustest: add support for synctest instead of timers (#17522) 2 months ago
netmon_windows.go net/netmon: publish events to event bus 8 months ago
polling.go net/netmon: factor out debounce loop, simplify polling impl 2 years ago
state.go net/netmon: handle net.IPAddr types during interface address parsing (#17523) 2 months ago