Skip to content

Commit

Permalink
all: Update build constraints to Go 1.17 style (#7894)
Browse files Browse the repository at this point in the history
  • Loading branch information
calmh committed Aug 17, 2021
1 parent 8c94ce8 commit d47745a
Show file tree
Hide file tree
Showing 81 changed files with 86 additions and 5 deletions.
1 change: 1 addition & 0 deletions build.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build ignore
// +build ignore

package main
Expand Down
3 changes: 2 additions & 1 deletion cmd/strelaypoolsrv/auto/noassets.go
Expand Up @@ -4,7 +4,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//+build noassets
//go:build noassets
// +build noassets

package auto

Expand Down
1 change: 1 addition & 0 deletions cmd/syncthing/openurl_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows
// +build !windows

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/syncthing/openurl_windows.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/syncthing/options_others.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows
// +build !windows

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/syncthing/perfstats_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !solaris && !windows
// +build !solaris,!windows

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/syncthing/perfstats_unsupported.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build solaris || windows
// +build solaris windows

package main
Expand Down
3 changes: 2 additions & 1 deletion cmd/syncthing/traceback.go
Expand Up @@ -4,7 +4,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//+build go1.7
//go:build go1.7
// +build go1.7

package main

Expand Down
3 changes: 2 additions & 1 deletion lib/api/auto/noassets.go
Expand Up @@ -4,7 +4,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//+build noassets
//go:build noassets
// +build noassets

package auto

Expand Down
3 changes: 2 additions & 1 deletion lib/build/tags_race.go
Expand Up @@ -4,7 +4,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//+build race
//go:build race
// +build race

package build

Expand Down
1 change: 1 addition & 0 deletions lib/connections/quic_dial.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build go1.14 && !noquic && !go1.17
// +build go1.14,!noquic,!go1.17

package connections
Expand Down
1 change: 1 addition & 0 deletions lib/connections/quic_listen.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build go1.14 && !noquic && !go1.17
// +build go1.14,!noquic,!go1.17

package connections
Expand Down
1 change: 1 addition & 0 deletions lib/connections/quic_misc.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build go1.14 && !noquic && !go1.17
// +build go1.14,!noquic,!go1.17

package connections
Expand Down
1 change: 1 addition & 0 deletions lib/connections/quic_unsupported.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build noquic || !go1.14 || go1.17
// +build noquic !go1.14 go1.17

package connections
Expand Down
1 change: 1 addition & 0 deletions lib/dialer/control_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !solaris && !windows
// +build !solaris,!windows

package dialer
Expand Down
1 change: 1 addition & 0 deletions lib/dialer/control_unsupported.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build solaris
// +build solaris

package dialer
Expand Down
1 change: 1 addition & 0 deletions lib/dialer/control_windows.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package dialer
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_copy_range_copyfilerange.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build linux
// +build linux

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_copy_range_duplicateextents.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_copy_range_ioctl.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build linux
// +build linux

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_copy_range_sendfile.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build linux || solaris
// +build linux solaris

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_fileinfo_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows
// +build !windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_lstat_broken.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build linux || android
// +build linux android

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_lstat_regular.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !linux && !android && !windows
// +build !linux,!android,!windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_lstat_windows.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows
// +build !windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build (!solaris && !darwin) || (solaris && cgo) || (darwin && cgo)
// +build !solaris,!darwin solaris,cgo darwin,cgo

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_errors_linux.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build linux
// +build linux

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_errors_others.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build !linux
// +build !linux

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_eventtypes_darwin.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build darwin && !kqueue && cgo
// +build darwin,!kqueue,cgo

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_eventtypes_fen.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build solaris && cgo
// +build solaris,cgo

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_eventtypes_inotify.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build linux
// +build linux

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_eventtypes_kqueue.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build dragonfly || freebsd || netbsd || openbsd
// +build dragonfly freebsd netbsd openbsd

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_eventtypes_other.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build !linux && !windows && !dragonfly && !freebsd && !netbsd && !openbsd && !solaris && !darwin && !cgo
// +build !linux,!windows,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!darwin,!cgo

// Catch all platforms that are not specifically handled to use the generic
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_eventtypes_readdcw.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_test.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build (!solaris && !darwin) || (solaris && cgo) || (darwin && cgo)
// +build !solaris,!darwin solaris,cgo darwin,cgo

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_watch_unsupported.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.

//go:build (solaris && !cgo) || (darwin && !cgo)
// +build solaris,!cgo darwin,!cgo

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_windows.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/basicfs_windows_test.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package fs
Expand Down
1 change: 1 addition & 0 deletions lib/fs/debug_symlink_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows
// +build !windows

package fs
Expand Down
3 changes: 2 additions & 1 deletion lib/osutil/atomic_unix_test.go
Expand Up @@ -4,7 +4,8 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//+build !windows
//go:build !windows
// +build !windows

// (No syscall.Umask or the equivalent on Windows)

Expand Down
1 change: 1 addition & 0 deletions lib/osutil/filenames_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows && !darwin
// +build !windows,!darwin

package osutil
Expand Down
1 change: 1 addition & 0 deletions lib/osutil/hidden_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows
// +build !windows

package osutil
Expand Down
1 change: 1 addition & 0 deletions lib/osutil/hidden_windows.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package osutil
Expand Down
1 change: 1 addition & 0 deletions lib/osutil/lowprio_linux.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !android
// +build !android

package osutil
Expand Down
1 change: 1 addition & 0 deletions lib/osutil/lowprio_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build (!windows && !linux) || android
// +build !windows,!linux android

package osutil
Expand Down
1 change: 1 addition & 0 deletions lib/osutil/rlimit_unix.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build !windows
// +build !windows

package osutil
Expand Down
1 change: 1 addition & 0 deletions lib/osutil/rlimit_windows.go
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

//go:build windows
// +build windows

package osutil
Expand Down

0 comments on commit d47745a

Please sign in to comment.