From bec657b7e2a4b298eb0d86c7badb3ed4e98f49f3 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 31 Dec 2023 08:53:38 -0800 Subject: [PATCH] Remove legacy +build comments; use go:build only Signed-off-by: Brad Fitzpatrick --- app/publisher/js/file.go | 1 - app/publisher/js/gensearchtypes.go | 3 +-- app/publisher/js/main.go | 1 - app/publisher/js/members.go | 1 - clients/android/build-in-docker.go | 1 - cmd/pk-put/stat_darwin.go | 3 --- cmd/pk-put/stat_linux.go | 3 --- cmd/pk-put/stat_windows.go | 3 --- deps/deps.go | 1 - dev/devcam/exec.go | 1 - internal/netutil/ident_cgo.go | 1 - internal/netutil/ident_nocgo.go | 1 - internal/osutil/restart_freebsd.go | 3 --- internal/osutil/restart_windows.go | 3 --- internal/osutil/syscall_solaris.go | 1 - make.go | 3 +-- misc/docker/server/build-perkeep-server.go | 1 - misc/release/build-binaries.go | 1 - misc/release/zip-source.go | 1 - pkg/blobserver/encrypt/permissions_posix.go | 1 - pkg/blobserver/files/osfs_posix.go | 1 - pkg/client/android/androidx_fake.go | 1 - pkg/client/android/androidx_real.go | 1 - pkg/client/client_js.go | 1 - pkg/client/transport_test.go | 1 - pkg/cmdmain/exec.go | 1 - pkg/env/env_nojs.go | 1 - pkg/schema/lookup_cgo.go | 1 - pkg/schema/lookup_nocgo.go | 1 - pkg/server/cgo_probe.go | 1 - server/perkeepd/perkeepd_unix.go | 1 - 31 files changed, 2 insertions(+), 43 deletions(-) diff --git a/app/publisher/js/file.go b/app/publisher/js/file.go index 86d9bf65b..0c89c25dd 100644 --- a/app/publisher/js/file.go +++ b/app/publisher/js/file.go @@ -1,5 +1,4 @@ //go:build js -// +build js /* Copyright 2016 The Perkeep Authors. diff --git a/app/publisher/js/gensearchtypes.go b/app/publisher/js/gensearchtypes.go index 7e9f3373f..343714249 100644 --- a/app/publisher/js/gensearchtypes.go +++ b/app/publisher/js/gensearchtypes.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore /* Copyright 2016 The Perkeep Authors. @@ -48,7 +47,7 @@ func main() { }() } - fmt.Fprintln(out, `// +build js + fmt.Fprintln(out, `//go:build js // generated by gensearchtypes.go; DO NOT EDIT diff --git a/app/publisher/js/main.go b/app/publisher/js/main.go index a86587d15..b1d0c14ef 100644 --- a/app/publisher/js/main.go +++ b/app/publisher/js/main.go @@ -1,5 +1,4 @@ //go:build js -// +build js //go:generate go run gensearchtypes.go -out zsearch.go diff --git a/app/publisher/js/members.go b/app/publisher/js/members.go index 561343ac7..559888c49 100644 --- a/app/publisher/js/members.go +++ b/app/publisher/js/members.go @@ -1,5 +1,4 @@ //go:build js -// +build js /* Copyright 2016 The Perkeep Authors. diff --git a/clients/android/build-in-docker.go b/clients/android/build-in-docker.go index eb083ce86..071bb6b19 100755 --- a/clients/android/build-in-docker.go +++ b/clients/android/build-in-docker.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore /* Copyright 2017 The Perkeep Authors. diff --git a/cmd/pk-put/stat_darwin.go b/cmd/pk-put/stat_darwin.go index 41d113a91..e9799bc82 100644 --- a/cmd/pk-put/stat_darwin.go +++ b/cmd/pk-put/stat_darwin.go @@ -1,6 +1,3 @@ -//go:build darwin -// +build darwin - package main import ( diff --git a/cmd/pk-put/stat_linux.go b/cmd/pk-put/stat_linux.go index 3ec35a352..a7f8e067e 100644 --- a/cmd/pk-put/stat_linux.go +++ b/cmd/pk-put/stat_linux.go @@ -1,6 +1,3 @@ -//go:build linux -// +build linux - // TODO: move this to somewhere generic in osutil; use it for all // posix-y operation systems? Or rather, don't clean bad fields, but // provide a portable way to extract all good fields. diff --git a/cmd/pk-put/stat_windows.go b/cmd/pk-put/stat_windows.go index 8210ae617..773a91c1d 100644 --- a/cmd/pk-put/stat_windows.go +++ b/cmd/pk-put/stat_windows.go @@ -1,6 +1,3 @@ -//go:build windows -// +build windows - package main import "syscall" diff --git a/deps/deps.go b/deps/deps.go index ea74e56d2..a32854b3c 100644 --- a/deps/deps.go +++ b/deps/deps.go @@ -1,5 +1,4 @@ //go:build deps -// +build deps // Package deps depends on go modules in order to work around the fact that // `go mod` subcommands will end up removing dependencies from the vendor directory diff --git a/dev/devcam/exec.go b/dev/devcam/exec.go index 9aec6065c..4f53a59ab 100644 --- a/dev/devcam/exec.go +++ b/dev/devcam/exec.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows /* Copyright 2013 The Perkeep Authors diff --git a/internal/netutil/ident_cgo.go b/internal/netutil/ident_cgo.go index 70383f2ec..6bf764e3d 100644 --- a/internal/netutil/ident_cgo.go +++ b/internal/netutil/ident_cgo.go @@ -1,5 +1,4 @@ //go:build !nocgo -// +build !nocgo /* Copyright 2016 The Perkeep Authors. diff --git a/internal/netutil/ident_nocgo.go b/internal/netutil/ident_nocgo.go index 794274651..10a86faa4 100644 --- a/internal/netutil/ident_nocgo.go +++ b/internal/netutil/ident_nocgo.go @@ -1,5 +1,4 @@ //go:build nocgo -// +build nocgo /* Copyright 2016 The Perkeep Authors. diff --git a/internal/osutil/restart_freebsd.go b/internal/osutil/restart_freebsd.go index 2b675df6d..2ee413f9a 100644 --- a/internal/osutil/restart_freebsd.go +++ b/internal/osutil/restart_freebsd.go @@ -1,6 +1,3 @@ -//go:build freebsd -// +build freebsd - /* Copyright 2012 The Perkeep Authors. diff --git a/internal/osutil/restart_windows.go b/internal/osutil/restart_windows.go index f0fef0e09..dbee2d53f 100644 --- a/internal/osutil/restart_windows.go +++ b/internal/osutil/restart_windows.go @@ -1,6 +1,3 @@ -//go:build windows -// +build windows - /* Copyright 2014 The Perkeep Authors. diff --git a/internal/osutil/syscall_solaris.go b/internal/osutil/syscall_solaris.go index 58fc7afce..18953a48a 100644 --- a/internal/osutil/syscall_solaris.go +++ b/internal/osutil/syscall_solaris.go @@ -1,5 +1,4 @@ //go:build solaris -// +build solaris /* Copyright 2014 The Perkeep Authors. diff --git a/make.go b/make.go index c5ade44ed..f811f42cb 100644 --- a/make.go +++ b/make.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore /* Copyright 2013 The Perkeep Authors @@ -798,7 +797,7 @@ func embedClosure(closureDir, embedFile string) error { // then embed it as a quoted string var qb bytes.Buffer - fmt.Fprint(&qb, "// +build with_embed\n\n") + fmt.Fprint(&qb, "//go:build with_embed\n\n") fmt.Fprint(&qb, "package closure\n\n") fmt.Fprint(&qb, "import \"time\"\n\n") fmt.Fprint(&qb, "func init() {\n") diff --git a/misc/docker/server/build-perkeep-server.go b/misc/docker/server/build-perkeep-server.go index 218310166..9fba3d902 100644 --- a/misc/docker/server/build-perkeep-server.go +++ b/misc/docker/server/build-perkeep-server.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore /* Copyright 2015 The Perkeep Authors diff --git a/misc/release/build-binaries.go b/misc/release/build-binaries.go index f3716a08c..cac3dcb91 100644 --- a/misc/release/build-binaries.go +++ b/misc/release/build-binaries.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore /* Copyright 2015 The Perkeep Authors diff --git a/misc/release/zip-source.go b/misc/release/zip-source.go index e1a421c2c..53fa6343e 100644 --- a/misc/release/zip-source.go +++ b/misc/release/zip-source.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore /* Copyright 2016 The Perkeep Authors diff --git a/pkg/blobserver/encrypt/permissions_posix.go b/pkg/blobserver/encrypt/permissions_posix.go index 5a210e8fb..65bdb8b5c 100644 --- a/pkg/blobserver/encrypt/permissions_posix.go +++ b/pkg/blobserver/encrypt/permissions_posix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows /* Copyright 2021 The Perkeep Authors diff --git a/pkg/blobserver/files/osfs_posix.go b/pkg/blobserver/files/osfs_posix.go index e37c34751..45d641ffc 100644 --- a/pkg/blobserver/files/osfs_posix.go +++ b/pkg/blobserver/files/osfs_posix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows /* Copyright 2011 The Perkeep Authors diff --git a/pkg/client/android/androidx_fake.go b/pkg/client/android/androidx_fake.go index 1bf6bcdc6..e51676872 100644 --- a/pkg/client/android/androidx_fake.go +++ b/pkg/client/android/androidx_fake.go @@ -1,5 +1,4 @@ //go:build fake_android -// +build fake_android /* Copyright 2015 The Perkeep Authors. diff --git a/pkg/client/android/androidx_real.go b/pkg/client/android/androidx_real.go index f58bfa8db..ab72aba35 100644 --- a/pkg/client/android/androidx_real.go +++ b/pkg/client/android/androidx_real.go @@ -1,5 +1,4 @@ //go:build !fake_android -// +build !fake_android /* Copyright 2015 The Perkeep Authors. diff --git a/pkg/client/client_js.go b/pkg/client/client_js.go index 8bcd61a7c..bbcda6e6b 100644 --- a/pkg/client/client_js.go +++ b/pkg/client/client_js.go @@ -1,5 +1,4 @@ //go:build js -// +build js /* Copyright 2018 The Perkeep Authors. diff --git a/pkg/client/transport_test.go b/pkg/client/transport_test.go index d7a7d9ae8..4915d79e6 100644 --- a/pkg/client/transport_test.go +++ b/pkg/client/transport_test.go @@ -1,5 +1,4 @@ //go:build fake_android -// +build fake_android /* Copyright 2015 The Perkeep Authors. diff --git a/pkg/cmdmain/exec.go b/pkg/cmdmain/exec.go index 1baa92e07..607feb6d2 100644 --- a/pkg/cmdmain/exec.go +++ b/pkg/cmdmain/exec.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows /* Copyright 2018 The Perkeep Authors diff --git a/pkg/env/env_nojs.go b/pkg/env/env_nojs.go index 1724ee09f..b1b1815c8 100644 --- a/pkg/env/env_nojs.go +++ b/pkg/env/env_nojs.go @@ -1,5 +1,4 @@ //go:build !js -// +build !js /* Copyright 2017 The Perkeep Authors diff --git a/pkg/schema/lookup_cgo.go b/pkg/schema/lookup_cgo.go index 6a1e8101f..88c2ab3b2 100644 --- a/pkg/schema/lookup_cgo.go +++ b/pkg/schema/lookup_cgo.go @@ -1,5 +1,4 @@ //go:build !nocgo -// +build !nocgo /* Copyright 2016 The Perkeep Authors. diff --git a/pkg/schema/lookup_nocgo.go b/pkg/schema/lookup_nocgo.go index 173b74e0b..ebb50c4d8 100644 --- a/pkg/schema/lookup_nocgo.go +++ b/pkg/schema/lookup_nocgo.go @@ -1,5 +1,4 @@ //go:build nocgo -// +build nocgo /* Copyright 2016 The Perkeep Authors. diff --git a/pkg/server/cgo_probe.go b/pkg/server/cgo_probe.go index 6a1e5276c..ea97b07a3 100644 --- a/pkg/server/cgo_probe.go +++ b/pkg/server/cgo_probe.go @@ -1,5 +1,4 @@ //go:build cgo -// +build cgo /* Copyright 2015 The Perkeep Authors diff --git a/server/perkeepd/perkeepd_unix.go b/server/perkeepd/perkeepd_unix.go index dec4df441..630318bda 100644 --- a/server/perkeepd/perkeepd_unix.go +++ b/server/perkeepd/perkeepd_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows /* Copyright 2017 The Perkeep Authors.