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/util/winutil
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
..
authenticode all: add test for package comments, fix, add comments as needed 1 year ago
conpty util/winutil: add conpty package and helper for building windows.StartupInfoEx 2 years ago
gp cmd/tailscaled,util/syspolicy/source,util/winutil/gp: disallow acquiring the GP lock during service startup 11 months ago
policy winutil: refactor methods to get values from registry to also return (#9536) 2 years ago
s4u util/winutil/s4u: fix token handle leak 1 year ago
testdata/testrestartableprocesses all: add test for package comments, fix, add comments as needed 1 year ago
winenv all: add test for package comments, fix, add comments as needed 1 year ago
mksyscall.go util/winutil: ensure domain controller address is used when retrieving remote profile information 1 year ago
restartmgr_windows.go all: use Go 1.20's errors.Join instead of our multierr package 2 months ago
restartmgr_windows_test.go all: use Go 1.22 range-over-int 2 years ago
startupinfo_windows.go util/winutil: add constants from Win32 SDK for dll blocking mitigation policies 1 year ago
subprocess_windows_test.go all: cleanup unused code, part 2 (#10670) 2 years ago
svcdiag_windows.go all: apply consistent imports of "json" packages 1 month ago
userprofile_windows.go util/winutil: ensure domain controller address is used when retrieving remote profile information 1 year ago
userprofile_windows_test.go util/winutil: ensure domain controller address is used when retrieving remote profile information 1 year ago
winutil.go util/syspolicy: add ReadStringArray interface (#11857) 2 years ago
winutil_notwindows.go util/syspolicy: add ReadStringArray interface (#11857) 2 years ago
winutil_windows.go clientupdate, util/osshare, util/winutil, version: improve Windows GUI filename resolution and WinUI build awareness 2 months ago
winutil_windows_test.go util/winutil: add AllocateContiguousBuffer and SetNTString helper funcs 2 years ago
zsyscall_windows.go util/winutil: ensure domain controller address is used when retrieving remote profile information 1 year ago