]> Cypherpunks.ru repositories - gostls13.git/commit
all: gofmt more (but vendor, testdata, and top-level test directories)
authorDmitri Shuralyov <dmitshur@golang.org>
Tue, 10 Aug 2021 00:29:14 +0000 (20:29 -0400)
committerDmitri Shuralyov <dmitshur@golang.org>
Fri, 13 Aug 2021 20:45:17 +0000 (20:45 +0000)
commit98f3d7fecbb8a9074f5f4ffc50bb016e194940b7
tree8df9912af4753b4127056f5acdf7730bd3fa16ce
parent20a620fd9f7bc35739c1af3602d53808d0430814
all: gofmt more (but vendor, testdata, and top-level test directories)

CL 294430 made packages in std and cmd modules use Go 1.17 gofmt format,
adding //go:build lines. This change applies the same formatting to some
more packages that 'go fmt' missed (e.g., syscall/js, runtime/msan), and
everything else that is easy and safe to modify in bulk.

Consider the top-level test directory, testdata, and vendor directories
out of scope, since there are many files that don't follow strict gofmt
formatting, often for intentional and legitimate reasons (testing gofmt
itself, invalid Go programs that shouldn't crash the compiler, etc.).

That makes it easy and safe to gofmt -w the .go files that are found
with gofmt -l with aforementioned directories filtered out:

$ gofmt -l . 2>/dev/null | \
grep -v '^test/' | \
grep -v '/testdata/' | \
grep -v '/vendor/' | wc -l
      51

None of the 51 files are generated. After this change, the same command
prints 0.

For #41184.

Change-Id: Ia96ee2a0f998d6a167d4473bcad17ad09bc1d86e
Reviewed-on: https://go-review.googlesource.com/c/go/+/341009
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
51 files changed:
misc/android/go_android_exec.go
misc/cgo/gmp/fib.go
misc/cgo/gmp/pi.go
misc/cgo/test/cgo_thread_lock.go
misc/cgo/test/cgo_unix_test.go
misc/cgo/test/issue1435.go
misc/cgo/test/issue18146.go
misc/cgo/test/issue21897.go
misc/cgo/test/issue21897b.go
misc/cgo/test/issue4029.go
misc/cgo/test/issue4029w.go
misc/cgo/test/issue6997_linux.go
misc/cgo/test/issue8517.go
misc/cgo/test/issue8694.go
misc/cgo/test/sigaltstack.go
misc/cgo/test/sigprocmask.go
misc/cgo/test/test_unix.go
misc/cgo/testso/noso_test.go
misc/cgo/testso/so_test.go
misc/cgo/testsovar/noso_test.go
misc/cgo/testsovar/so_test.go
misc/cgo/testtls/tls_test.go
misc/ios/detect.go
misc/reboot/experiment_toolid_test.go
src/cmd/compile/internal/base/bootstrap_false.go
src/cmd/compile/internal/base/bootstrap_true.go
src/cmd/compile/internal/noder/frames_go1.go
src/cmd/compile/internal/noder/frames_go17.go
src/cmd/compile/internal/ssa/gen/386Ops.go
src/cmd/compile/internal/ssa/gen/MIPS64Ops.go
src/cmd/compile/internal/ssa/gen/MIPSOps.go
src/cmd/compile/internal/ssa/gen/PPC64Ops.go
src/cmd/compile/internal/ssa/gen/RISCV64Ops.go
src/cmd/compile/internal/ssa/gen/S390XOps.go
src/cmd/compile/internal/ssa/gen/WasmOps.go
src/cmd/compile/internal/ssa/gen/dec64Ops.go
src/cmd/compile/internal/ssa/gen/decOps.go
src/internal/syscall/windows/exec_windows_test.go
src/internal/syscall/windows/mksyscall.go
src/internal/syscall/windows/registry/export_test.go
src/internal/syscall/windows/registry/key.go
src/internal/syscall/windows/registry/mksyscall.go
src/internal/syscall/windows/registry/registry_test.go
src/internal/syscall/windows/registry/syscall.go
src/internal/syscall/windows/registry/value.go
src/internal/syscall/windows/sysdll/sysdll.go
src/runtime/msan/msan.go
src/syscall/js/export_test.go
src/syscall/js/func.go
src/syscall/js/js.go
src/syscall/js/js_test.go