mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-22 23:19:31 +08:00
*: add go-1.17+ go:build tags
Go 1.17 introduce this new (and better) way to specify build tags. For more info, see https://golang.org/design/draft-gobuild. As a way to seamlessly switch from old to new build tags, gofmt (and gopls) from go 1.17 adds the new tags along with the old ones. Later, when go < 1.17 is no longer supported, the old build tags can be removed. Now, as I started to use latest gopls (v0.7.1), it adds these tags while I edit. Rather than to randomly add new build tags, I guess it is better to do it once for all files. Mind that previous commits removed some tags that were useless, so this one only touches packages that can at least be built on non-linux. Brought to you by go1.17 fmt ./... Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package apparmor
|
package apparmor
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package capabilities
|
package capabilities
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package capabilities
|
package capabilities
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !go1.16
|
||||||
// +build !go1.16
|
// +build !go1.16
|
||||||
|
|
||||||
package cgroups
|
package cgroups
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package configs
|
package configs
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build gofuzz
|
||||||
// +build gofuzz
|
// +build gofuzz
|
||||||
|
|
||||||
package configs
|
package configs
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package configs
|
package configs
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux && !windows
|
||||||
// +build !linux,!windows
|
// +build !linux,!windows
|
||||||
|
|
||||||
package configs
|
package configs
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package configs
|
package configs
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package devices
|
package devices
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package devices
|
package devices
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux && cgo && seccomp
|
||||||
// +build linux,cgo,seccomp
|
// +build linux,cgo,seccomp
|
||||||
|
|
||||||
package integration
|
package integration
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux && !gccgo
|
||||||
// +build linux,!gccgo
|
// +build linux,!gccgo
|
||||||
|
|
||||||
package nsenter
|
package nsenter
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux && gccgo
|
||||||
// +build linux,gccgo
|
// +build linux,gccgo
|
||||||
|
|
||||||
package nsenter
|
package nsenter
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux || !cgo
|
||||||
// +build !linux !cgo
|
// +build !linux !cgo
|
||||||
|
|
||||||
package nsenter
|
package nsenter
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build cgo && seccomp
|
||||||
// +build cgo,seccomp
|
// +build cgo,seccomp
|
||||||
|
|
||||||
package patchbpf
|
package patchbpf
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build cgo && seccomp
|
||||||
// +build cgo,seccomp
|
// +build cgo,seccomp
|
||||||
|
|
||||||
package patchbpf
|
package patchbpf
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux || !cgo || !seccomp
|
||||||
// +build !linux !cgo !seccomp
|
// +build !linux !cgo !seccomp
|
||||||
|
|
||||||
package patchbpf
|
package patchbpf
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build cgo && seccomp
|
||||||
// +build cgo,seccomp
|
// +build cgo,seccomp
|
||||||
|
|
||||||
package seccomp
|
package seccomp
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux || !cgo || !seccomp
|
||||||
// +build !linux !cgo !seccomp
|
// +build !linux !cgo !seccomp
|
||||||
|
|
||||||
package seccomp
|
package seccomp
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package system
|
package system
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux && (386 || arm)
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build 386 arm
|
// +build 386 arm
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build linux && (arm64 || amd64 || mips || mipsle || mips64 || mips64le || ppc || ppc64 || ppc64le || riscv64 || s390x)
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le riscv64 s390x
|
// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le riscv64 s390x
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package user
|
package user
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build gofuzz
|
||||||
// +build gofuzz
|
// +build gofuzz
|
||||||
|
|
||||||
package user
|
package user
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build gofuzz
|
||||||
// +build gofuzz
|
// +build gofuzz
|
||||||
|
|
||||||
package userns
|
package userns
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !linux
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
package userns
|
package userns
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package utils
|
package utils
|
||||||
|
Reference in New Issue
Block a user