diff --git a/.circleci/config.yml b/.circleci/config.yml index 97152bea78..4ef5881105 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,7 +108,7 @@ jobs: - run: command: go install -mod=readonly github.com/google/go-jsonnet/cmd/jsonnet github.com/google/go-jsonnet/cmd/jsonnetfmt github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb working_directory: ~/project/documentation/prometheus-mixin - -8716766cb49ab9dd7df5622d80bb217b94a21d0f3d3dc3d074c3ec7a0c7f67ea run: + - run: command: make clean working_directory: ~/project/documentation/prometheus-mixin - run: diff --git a/cmd/prometheus/main_unix_test.go b/cmd/prometheus/main_unix_test.go index 393c6f952c..7724f0dd13 100644 --- a/cmd/prometheus/main_unix_test.go +++ b/cmd/prometheus/main_unix_test.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // +//go:build !windows // +build !windows package main diff --git a/config/config_default_test.go b/config/config_default_test.go index e0f09aa11b..f5333f4c88 100644 --- a/config/config_default_test.go +++ b/config/config_default_test.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !windows // +build !windows package config diff --git a/documentation/prometheus-mixin/tools.go b/documentation/prometheus-mixin/tools.go index e3551e8219..1115bb9534 100644 --- a/documentation/prometheus-mixin/tools.go +++ b/documentation/prometheus-mixin/tools.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build tools +//go:build tools +// +build tools // Package tools tracks dependencies for tools that used in the build process. // See https://github.com/golang/go/issues/25922 diff --git a/pkg/runtime/limits_default.go b/pkg/runtime/limits_default.go index 4f59b1c55d..c3e0b4701a 100644 --- a/pkg/runtime/limits_default.go +++ b/pkg/runtime/limits_default.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !windows // +build !windows package runtime diff --git a/pkg/runtime/limits_windows.go b/pkg/runtime/limits_windows.go index d947e132ec..ce514949ee 100644 --- a/pkg/runtime/limits_windows.go +++ b/pkg/runtime/limits_windows.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows // +build windows package runtime diff --git a/pkg/runtime/statfs.go b/pkg/runtime/statfs.go index 06522094eb..2e5a624b61 100644 --- a/pkg/runtime/statfs.go +++ b/pkg/runtime/statfs.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build openbsd || windows || netbsd || solaris // +build openbsd windows netbsd solaris package runtime diff --git a/pkg/runtime/statfs_default.go b/pkg/runtime/statfs_default.go index 8ce7d8339f..a493a5cbb8 100644 --- a/pkg/runtime/statfs_default.go +++ b/pkg/runtime/statfs_default.go @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !windows,!openbsd,!netbsd,!solaris -// +build !386 +//go:build !windows && !openbsd && !netbsd && !solaris && !386 +// +build !windows,!openbsd,!netbsd,!solaris,!386 package runtime diff --git a/pkg/runtime/statfs_linux_386.go b/pkg/runtime/statfs_linux_386.go index ba90ca8a63..b45eecdd37 100644 --- a/pkg/runtime/statfs_linux_386.go +++ b/pkg/runtime/statfs_linux_386.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build linux && 386 // +build linux,386 package runtime diff --git a/pkg/runtime/statfs_uint32.go b/pkg/runtime/statfs_uint32.go index 1a5557a8ce..fa10ebc967 100644 --- a/pkg/runtime/statfs_uint32.go +++ b/pkg/runtime/statfs_uint32.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build (386 && darwin) || (386 && freebsd) // +build 386,darwin 386,freebsd package runtime diff --git a/pkg/runtime/uname_default.go b/pkg/runtime/uname_default.go index 595a4a28c7..1613371214 100644 --- a/pkg/runtime/uname_default.go +++ b/pkg/runtime/uname_default.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !linux // +build !linux package runtime diff --git a/pkg/runtime/vmlimits_default.go b/pkg/runtime/vmlimits_default.go index 47c4dd7c91..bf35b48fe0 100644 --- a/pkg/runtime/vmlimits_default.go +++ b/pkg/runtime/vmlimits_default.go @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !windows -// +build !openbsd +//go:build !windows && !openbsd +// +build !windows,!openbsd package runtime diff --git a/pkg/runtime/vmlimits_openbsd.go b/pkg/runtime/vmlimits_openbsd.go index f2117fe06b..e33ab48023 100644 --- a/pkg/runtime/vmlimits_openbsd.go +++ b/pkg/runtime/vmlimits_openbsd.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build openbsd // +build openbsd package runtime diff --git a/promql/fuzz.go b/promql/fuzz.go index eeb1fede85..b34fbbc669 100644 --- a/promql/fuzz.go +++ b/promql/fuzz.go @@ -12,6 +12,7 @@ // limitations under the License. // Only build when go-fuzz is in use +//go:build gofuzz // +build gofuzz package promql diff --git a/scripts/tools.go b/scripts/tools.go index fda90e16af..52b4649112 100644 --- a/scripts/tools.go +++ b/scripts/tools.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build tools // +build tools // Package tools tracks dependencies for tools that are required to generate the protobuf code. diff --git a/tsdb/chunks/head_chunks_other.go b/tsdb/chunks/head_chunks_other.go index a1de873707..8b37dd8c25 100644 --- a/tsdb/chunks/head_chunks_other.go +++ b/tsdb/chunks/head_chunks_other.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !windows // +build !windows package chunks diff --git a/tsdb/fileutil/dir_unix.go b/tsdb/fileutil/dir_unix.go index 58a77dfc1a..db310014ef 100644 --- a/tsdb/fileutil/dir_unix.go +++ b/tsdb/fileutil/dir_unix.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !windows // +build !windows package fileutil diff --git a/tsdb/fileutil/dir_windows.go b/tsdb/fileutil/dir_windows.go index c123395c00..f67cc74b31 100644 --- a/tsdb/fileutil/dir_windows.go +++ b/tsdb/fileutil/dir_windows.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows // +build windows package fileutil diff --git a/tsdb/fileutil/flock_solaris.go b/tsdb/fileutil/flock_solaris.go index cfff8e42f8..f19c184a44 100644 --- a/tsdb/fileutil/flock_solaris.go +++ b/tsdb/fileutil/flock_solaris.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build solaris // +build solaris package fileutil diff --git a/tsdb/fileutil/flock_unix.go b/tsdb/fileutil/flock_unix.go index f6f78d367d..c0aeb69486 100644 --- a/tsdb/fileutil/flock_unix.go +++ b/tsdb/fileutil/flock_unix.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package fileutil diff --git a/tsdb/fileutil/mmap_386.go b/tsdb/fileutil/mmap_386.go index 66b9d36803..591d722d57 100644 --- a/tsdb/fileutil/mmap_386.go +++ b/tsdb/fileutil/mmap_386.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows // +build windows package fileutil diff --git a/tsdb/fileutil/mmap_amd64.go b/tsdb/fileutil/mmap_amd64.go index 4b523bc67c..4c9534e93f 100644 --- a/tsdb/fileutil/mmap_amd64.go +++ b/tsdb/fileutil/mmap_amd64.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows // +build windows package fileutil diff --git a/tsdb/fileutil/mmap_unix.go b/tsdb/fileutil/mmap_unix.go index 043f4d408c..9365c62f74 100644 --- a/tsdb/fileutil/mmap_unix.go +++ b/tsdb/fileutil/mmap_unix.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !windows && !plan9 // +build !windows,!plan9 package fileutil diff --git a/tsdb/fileutil/preallocate_other.go b/tsdb/fileutil/preallocate_other.go index 162fbc5f78..2c46dd4907 100644 --- a/tsdb/fileutil/preallocate_other.go +++ b/tsdb/fileutil/preallocate_other.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !linux && !darwin // +build !linux,!darwin package fileutil diff --git a/tsdb/fileutil/sync.go b/tsdb/fileutil/sync.go index 2e64a40880..5bd18b458c 100644 --- a/tsdb/fileutil/sync.go +++ b/tsdb/fileutil/sync.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !linux && !darwin // +build !linux,!darwin package fileutil diff --git a/tsdb/fileutil/sync_darwin.go b/tsdb/fileutil/sync_darwin.go index 2af1b0f411..155b944595 100644 --- a/tsdb/fileutil/sync_darwin.go +++ b/tsdb/fileutil/sync_darwin.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build darwin // +build darwin package fileutil diff --git a/tsdb/fileutil/sync_linux.go b/tsdb/fileutil/sync_linux.go index 8b4fc8268e..1c2091ea38 100644 --- a/tsdb/fileutil/sync_linux.go +++ b/tsdb/fileutil/sync_linux.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build linux // +build linux package fileutil diff --git a/tsdb/goversion/goversion.go b/tsdb/goversion/goversion.go index 93ff6ef8b9..02da2639d6 100644 --- a/tsdb/goversion/goversion.go +++ b/tsdb/goversion/goversion.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build go1.12 // +build go1.12 // Package goversion enforces the go version supported by the tsdb module. diff --git a/tsdb/wal_test.go b/tsdb/wal_test.go index 9667105e1e..fdcd6ce52d 100644 --- a/tsdb/wal_test.go +++ b/tsdb/wal_test.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !windows // +build !windows package tsdb diff --git a/web/ui/assets_generate.go b/web/ui/assets_generate.go index 1f7870c2f9..884329bd02 100644 --- a/web/ui/assets_generate.go +++ b/web/ui/assets_generate.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build ignore // +build ignore package main diff --git a/web/ui/ui.go b/web/ui/ui.go index 9ee4578017..6b569ca32d 100644 --- a/web/ui/ui.go +++ b/web/ui/ui.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !builtinassets // +build !builtinassets package ui