diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2618c4c59..1b473013d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -45,7 +45,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v3.5.0 with: - go-version: '1.20' + go-version-file: 'go.mod' - run: tools/go_branch.sh - run: git checkout go && git clean -xf . && go build ./... - if: github.event_name == 'push' diff --git a/go.mod b/go.mod index 51d3dc1e2..10620804c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module gvisor.dev/gvisor -go 1.20 +go 1.21.1 require ( github.com/BurntSushi/toml v1.2.1 diff --git a/pkg/coverage/coverage.go b/pkg/coverage/coverage.go index 17fd61cf0..0a7e5f585 100644 --- a/pkg/coverage/coverage.go +++ b/pkg/coverage/coverage.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false // Package coverage provides an interface through which Go coverage data can // be collected, converted to kcov format, and exposed to userspace. diff --git a/pkg/crypto/crypto_stdlib.go b/pkg/crypto/crypto_stdlib.go index 28eba2ff6..922a48933 100644 --- a/pkg/crypto/crypto_stdlib.go +++ b/pkg/crypto/crypto_stdlib.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package crypto diff --git a/pkg/flipcall/ctrl_futex.go b/pkg/flipcall/ctrl_futex.go index b3bf2f775..e221860c6 100644 --- a/pkg/flipcall/ctrl_futex.go +++ b/pkg/flipcall/ctrl_futex.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package flipcall diff --git a/pkg/memutil/mmap.go b/pkg/memutil/mmap.go index c909b8f3f..b41e1e00e 100644 --- a/pkg/memutil/mmap.go +++ b/pkg/memutil/mmap.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package memutil diff --git a/pkg/sentry/arch/arch_x86_impl.go b/pkg/sentry/arch/arch_x86_impl.go index 25fe2ed48..654168898 100644 --- a/pkg/sentry/arch/arch_x86_impl.go +++ b/pkg/sentry/arch/arch_x86_impl.go @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build (amd64 || 386) && go1.1 +//go:build (amd64 || 386) && !false // +build amd64 386 -// +build go1.1 +// +build !false package arch diff --git a/pkg/sentry/hostfd/hostfd_linux.go b/pkg/sentry/hostfd/hostfd_linux.go index 0131da22d..dec18ca95 100644 --- a/pkg/sentry/hostfd/hostfd_linux.go +++ b/pkg/sentry/hostfd/hostfd_linux.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package hostfd diff --git a/pkg/sentry/kernel/kernel_opts.go b/pkg/sentry/kernel/kernel_opts.go index 5ffafb0d1..2d46e99e5 100644 --- a/pkg/sentry/kernel/kernel_opts.go +++ b/pkg/sentry/kernel/kernel_opts.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package kernel diff --git a/pkg/sentry/kernel/threads_impl.go b/pkg/sentry/kernel/threads_impl.go index 825739e1b..f102494de 100644 --- a/pkg/sentry/kernel/threads_impl.go +++ b/pkg/sentry/kernel/threads_impl.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package kernel diff --git a/pkg/sentry/socket/hostinet/sockopt_impl.go b/pkg/sentry/socket/hostinet/sockopt_impl.go index 33d4136af..6ae2200ab 100644 --- a/pkg/sentry/socket/hostinet/sockopt_impl.go +++ b/pkg/sentry/socket/hostinet/sockopt_impl.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package hostinet diff --git a/pkg/sentry/state/state_metadata.go b/pkg/sentry/state/state_metadata.go index c42297c80..a3725790b 100644 --- a/pkg/sentry/state/state_metadata.go +++ b/pkg/sentry/state/state_metadata.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package state diff --git a/pkg/shim/runtimeoptions/runtimeoptions_cri.go b/pkg/shim/runtimeoptions/runtimeoptions_cri.go index 87573813c..de781170f 100644 --- a/pkg/shim/runtimeoptions/runtimeoptions_cri.go +++ b/pkg/shim/runtimeoptions/runtimeoptions_cri.go @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package runtimeoptions diff --git a/pkg/shim/runtimeoptions/v14/runtimeoptions_cri.go b/pkg/shim/runtimeoptions/v14/runtimeoptions_cri.go index f048c9415..1dd2817d5 100644 --- a/pkg/shim/runtimeoptions/v14/runtimeoptions_cri.go +++ b/pkg/shim/runtimeoptions/v14/runtimeoptions_cri.go @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package v14 diff --git a/pkg/test/testutil/testutil_runfiles.go b/pkg/test/testutil/testutil_runfiles.go index 1dbd48a47..8da7f3b03 100644 --- a/pkg/test/testutil/testutil_runfiles.go +++ b/pkg/test/testutil/testutil_runfiles.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package testutil diff --git a/runsc/boot/filter/config_profile.go b/runsc/boot/filter/config_profile.go index 29024e64b..90d88fe61 100644 --- a/runsc/boot/filter/config_profile.go +++ b/runsc/boot/filter/config_profile.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package filter diff --git a/runsc/boot/pprof/pprof.go b/runsc/boot/pprof/pprof.go index 36b78ad86..73c849e59 100644 --- a/runsc/boot/pprof/pprof.go +++ b/runsc/boot/pprof/pprof.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false // Package pprof provides a stub to initialize custom profilers. package pprof diff --git a/runsc/cmd/mitigate_extras.go b/runsc/cmd/mitigate_extras.go index 2c3e17cd6..f6b28b6cb 100644 --- a/runsc/cmd/mitigate_extras.go +++ b/runsc/cmd/mitigate_extras.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package cmd diff --git a/runsc/config/config_bundles.go b/runsc/config/config_bundles.go index 788da6b2d..57ef9b89a 100644 --- a/runsc/config/config_bundles.go +++ b/runsc/config/config_bundles.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package config diff --git a/runsc/flag/flag.go b/runsc/flag/flag.go index c361f90d9..2eafac273 100644 --- a/runsc/flag/flag.go +++ b/runsc/flag/flag.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false // Package flag wraps flag primitives. package flag diff --git a/runsc/main.go b/runsc/main.go index 6de99f6bf..8fccb26ba 100644 --- a/runsc/main.go +++ b/runsc/main.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false // Binary runsc implements the OCI runtime interface. package main diff --git a/runsc/metricserver/metricserver_lifecycle.go b/runsc/metricserver/metricserver_lifecycle.go index 76771e36b..072a90623 100644 --- a/runsc/metricserver/metricserver_lifecycle.go +++ b/runsc/metricserver/metricserver_lifecycle.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package metricserver diff --git a/runsc/version/version.go b/runsc/version/version.go index 16b3da3ff..af4e4cbf1 100644 --- a/runsc/version/version.go +++ b/runsc/version/version.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false // Package version holds a string containing version information for runsc. // Other packages may import it to get this information while avoiding diff --git a/test/packetimpact/testbench/dut_client.go b/test/packetimpact/testbench/dut_client.go index 3b69b28aa..9fe89da2b 100644 --- a/test/packetimpact/testbench/dut_client.go +++ b/test/packetimpact/testbench/dut_client.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package testbench diff --git a/tools/parsers/version.go b/tools/parsers/version.go index c250f4a2a..b6263efbd 100644 --- a/tools/parsers/version.go +++ b/tools/parsers/version.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.1 -// +build go1.1 +//go:build !false +// +build !false package main