Add go:build comments with go1.17beta1 fmt

This commit is contained in:
Hajime Hoshi 2021-06-11 01:03:35 +09:00
parent f1fc6fe3e8
commit b54ad73a2b
84 changed files with 104 additions and 27 deletions

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package audio

View File

@ -12,9 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !android
// +build !ios
// +build !js
//go:build !android && !ios && !js
// +build !android,!ios,!js
package audio

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin && !ios
// +build darwin,!ios
package readerdriver

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (aix || dragonfly || freebsd || hurd || illumos || linux || netbsd || openbsd || solaris) && !android
// +build aix dragonfly freebsd hurd illumos linux netbsd openbsd solaris
// +build !android

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build aix || dragonfly || freebsd || hurd || illumos || linux || netbsd || openbsd || solaris
// +build aix dragonfly freebsd hurd illumos linux netbsd openbsd solaris
package readerdriver

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ebitenmobilegobind
// +build ebitenmobilegobind
// gobind is a wrapper of the original gobind. This command adds extra files like a view controller.
@ -146,6 +147,7 @@ func run() error {
const objcM = `// Code generated by ebitenmobile. DO NOT EDIT.
//go:build ios
// +build ios
#import <TargetConditionals.h>

File diff suppressed because one or more lines are too long

View File

@ -112,11 +112,15 @@ func prepareGomobileCommands() (string, error) {
os.Chdir(pwd)
}()
const modname = "ebitenmobiletemporary"
const (
modname = "ebitenmobiletemporary"
buildtags = "//go:build tools" +
"\n// +build tools"
)
if err := runGo("mod", "init", modname); err != nil {
return tmp, err
}
if err := ioutil.WriteFile("tools.go", []byte(fmt.Sprintf(`// +build tools
if err := ioutil.WriteFile("tools.go", []byte(fmt.Sprintf(`%s
package %s
@ -124,7 +128,7 @@ import (
_ "golang.org/x/mobile/cmd/gobind"
_ "golang.org/x/mobile/cmd/gomobile"
)
`, modname)), 0644); err != nil {
`, buildtags, modname)), 0644); err != nil {
return tmp, err
}

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ebitendebug
// +build ebitendebug
package ebiten

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !ebitendebug
// +build !ebitendebug
package ebiten

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || freebsd || linux || windows) && !js && !android && !ios
// +build darwin freebsd linux windows
// +build !js
// +build !android

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
package main

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || freebsd || js || linux || windows) && !android && !ios
// +build darwin freebsd js linux windows
// +build !android
// +build !ios

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
package main

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
package main

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
// The key name convention follows the Web standard: https://www.w3.org/TR/uievents-code/#keyboard-key-codes
@ -814,9 +815,11 @@ func main() {
buildTag := ""
switch path {
case filepath.Join("internal", "glfw", "keys.go"):
buildTag = "// +build !js"
buildTag = "//go:build !js" +
"\n// +build !js"
case filepath.Join("internal", "uidriver", "glfw", "keys.go"):
buildTag = "// +build darwin freebsd linux windows" +
buildTag = "//go:build (darwin || freebsd || linux || windows) && !android && !ios" +
"\n// +build darwin freebsd linux windows" +
"\n// +build !android" +
"\n// +build !ios"
}

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build go1.13
// +build go1.13
package ebiten

View File

@ -12,9 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !android
// +build !js
// +build !ios
//go:build !android && !js && !ios
// +build !android,!js,!ios
package ebiten

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || js || ios
// +build android js ios
package ebiten

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ebitendebug
// +build ebitendebug
package debug

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !ebitendebug
// +build !ebitendebug
package debug

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (dragonfly || freebsd || linux || netbsd || openbsd || solaris) && !android
// +build dragonfly freebsd linux netbsd openbsd solaris
// +build !android

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ios
// +build ios
package devicescale

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build darwin
// +build !ios
//go:build darwin && !ios
// +build darwin,!ios
package devicescale

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (dragonfly || freebsd || linux || netbsd || openbsd || solaris) && !android
// +build dragonfly freebsd linux netbsd openbsd solaris
// +build !android

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !js
// +build !js
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
package main

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !windows
// +build !js
//go:build !windows && !js
// +build !windows,!js
package glfw

View File

@ -14,6 +14,7 @@
// Code generated by genkeys.go using 'go generate'. DO NOT EDIT.
//go:build !js
// +build !js
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build tools
// +build tools
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !js
// +build !js
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
// Package ca provides access to Apple's Core Animation API (https://developer.apple.com/documentation/quartzcore).

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
package metal

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
package mtl_test

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
// Package mtl provides access to Apple's Metal API (https://developer.apple.com/documentation/metal).

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
package mtl_test

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
// Package ns provides access to Apple's AppKit API (https://developer.apple.com/documentation/appkit).

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
package metal

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin
// +build darwin
package metal

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build darwin
// +build ios
//go:build darwin && ios
// +build darwin,ios
package metal

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build darwin
// +build !ios
//go:build darwin && !ios
// +build darwin,!ios
package metal

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package opengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || freebsd || linux || windows) && !android && !ios
// +build darwin freebsd linux windows
// +build !android
// +build !ios

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package opengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !ebitenwebgl1
// +build !ebitenwebgl1
package opengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || js || (!freebsd && !linux)
// +build android js !freebsd,!linux
package opengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ebitenwebgl1
// +build ebitenwebgl1
package opengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (freebsd || linux) && !android
// +build freebsd linux
// +build !android

View File

@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
//go:build !windows
// +build !windows
package gl

View File

@ -9,6 +9,7 @@
// This document is licensed under the SGI Free Software B License.
// For details, see http://oss.sgi.com/projects/FreeB.
//go:build !js
// +build !js
// Package gl implements Go bindings to OpenGL.

View File

@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
//go:build !windows
// +build !windows
package gl

View File

@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
//go:build freebsd || linux
// +build freebsd linux
package gl

View File

@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
//go:build !windows
// +build !windows
// This file implements GlowGetProcAddress for every supported platform. The

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package gles

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package gles

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package gles

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package gles

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package opengl

View File

@ -12,9 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !android
// +build !js
// +build !ios
//go:build !android && !js && !ios
// +build !android,!js,!ios
package opengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package opengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ignore
// +build ignore
package main

View File

@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build gofuzz
// +build gofuzz
package png

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !android
// +build !js
//go:build !android && !js
// +build !android,!js
package restorable

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !js
// +build !js
// Package testflock provides a lock for testing.

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !ebitengl
// +build !ebitengl
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build freebsd || linux || windows || ebitengl
// +build freebsd linux windows ebitengl
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows || js
// +build !windows js
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || freebsd || linux || windows) && !android && !ios
// +build darwin freebsd linux windows
// +build !android
// +build !ios

View File

@ -14,6 +14,7 @@
// Code generated by genkeys.go using 'go generate'. DO NOT EDIT.
//go:build (darwin || freebsd || linux || windows) && !android && !ios
// +build darwin freebsd linux windows
// +build !android
// +build !ios

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !ebitensinglethread && (darwin || freebsd || linux || windows) && !android && !ios
// +build !ebitensinglethread
// +build darwin freebsd linux windows
// +build !android

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ebitensinglethread && (darwin || freebsd || linux || windows) && !android && !ios
// +build ebitensinglethread
// +build darwin freebsd linux windows
// +build !android

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || freebsd || linux || windows) && !android && !ios
// +build darwin freebsd linux windows
// +build !android
// +build !ios

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !ios
// +build !ios
package glfw

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (dragonfly || freebsd || linux || netbsd || openbsd || solaris) && !android
// +build dragonfly freebsd linux netbsd openbsd solaris
// +build !android

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || freebsd || linux || windows) && !android && !ios
// +build darwin freebsd linux windows
// +build !android
// +build !ios

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build ((ios && arm) || (ios && arm64)) && !ebitengl
// +build ios,arm ios,arm64
// +build !ebitengl

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || (ios && 386) || (ios && amd64) || (ios && ebitengl)
// +build android ios,386 ios,amd64 ios,ebitengl
package mobile

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package mobile

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package mobile

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !js
// +build !js
package web

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package mobile

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !android
// +build !ios
//go:build !android && !ios
// +build !android,!ios
package mobile

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || freebsd || linux || windows) && !android && !ios && !js
// +build darwin freebsd linux windows
// +build !android
// +build !ios

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build android || ios
// +build android ios
package ebiten