From 86e694941f4bcbe435e8ea8a8584e04448f06415 Mon Sep 17 00:00:00 2001 From: Artem Yadelskyi Date: Thu, 3 Nov 2022 13:24:09 +0200 Subject: [PATCH] examples: remove `example` build tag (#2433) Closes #1462 --- .builds/alpine.yml | 2 +- .builds/arch.yml | 2 +- .builds/fedora.yml | 2 +- .builds/freebsd.yml | 2 +- .builds/ubuntu.yml | 2 +- .github/workflows/steam.sh | 2 +- .github/workflows/test.yml | 40 +++++++++++++-------------- .github/workflows/vuln.yml | 4 +-- CONTRIBUTING.md | 8 ------ examples/2048/main.go | 2 -- examples/README.md | 6 ++-- examples/additive/main.go | 2 -- examples/address/main.go | 2 -- examples/airship/main.go | 2 -- examples/alphablending/main.go | 2 -- examples/animation/main.go | 2 -- examples/audio/main.go | 2 -- examples/audioinfiniteloop/main.go | 2 -- examples/audiopanning/main.go | 2 -- examples/blocks/main.go | 2 -- examples/blur/main.go | 2 -- examples/camera/main.go | 2 -- examples/chipmunk/main.go | 2 -- examples/clip/main.go | 2 -- examples/contextlost/context_js.go | 2 -- examples/contextlost/context_notjs.go | 2 +- examples/contextlost/main.go | 2 -- examples/cursor/main.go | 2 -- examples/doomfire/main.go | 2 -- examples/drag/main.go | 2 -- examples/filter/main.go | 2 -- examples/flappy/main.go | 2 -- examples/flappy/main_c.go | 2 +- examples/flood/main.go | 2 -- examples/font/main.go | 2 -- examples/fullscreen/main.go | 2 -- examples/gamepad/main.go | 2 -- examples/highdpi/main.go | 2 -- examples/hsv/main.go | 2 -- examples/hue/main.go | 2 -- examples/infinitescroll/main.go | 2 -- examples/isometric/game.go | 2 -- examples/isometric/level.go | 2 -- examples/isometric/main.go | 2 -- examples/isometric/spritesheet.go | 2 -- examples/isometric/tile.go | 2 -- examples/keyboard/main.go | 2 -- examples/lasttouch/main.go | 2 -- examples/life/main.go | 2 -- examples/mandelbrot/main.go | 2 -- examples/mascot/main.go | 2 -- examples/masking/main.go | 2 -- examples/minify/main.go | 2 -- examples/moire/main.go | 2 -- examples/mosaic/main.go | 2 -- examples/noise/main.go | 2 -- examples/paint/main.go | 2 -- examples/particles/main.go | 2 -- examples/pcm/main.go | 2 -- examples/perspective/main.go | 2 -- examples/piano/main.go | 2 -- examples/platformer/main.go | 2 -- examples/polygons/main.go | 2 -- examples/raycasting/main.go | 2 -- examples/realtimepcm/main.go | 2 -- examples/rotate/main.go | 2 -- examples/set/main.go | 2 -- examples/shader/main.go | 2 -- examples/shapes/main.go | 2 -- examples/sinewave/main.go | 2 -- examples/skipdraw/main.go | 2 -- examples/snake/main.go | 2 -- examples/sprites/main.go | 2 -- examples/spriteshd/main.go | 2 -- examples/squiral/main.go | 2 -- examples/stars/main.go | 2 -- examples/text/main.go | 2 -- examples/tiles/main.go | 2 -- examples/touch/main.go | 2 -- examples/typewriter/main.go | 2 -- examples/ui/main.go | 2 -- examples/vector/main.go | 2 -- examples/vibrate/main.go | 2 -- examples/wav/main.go | 2 -- examples/wheel/main.go | 2 -- examples/windowclosing/main.go | 2 -- examples/windowsize/main.go | 2 -- 87 files changed, 33 insertions(+), 191 deletions(-) diff --git a/.builds/alpine.yml b/.builds/alpine.yml index 876ac089f..e6e7a0499 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -14,4 +14,4 @@ sources: tasks: - build: | cd ebiten - go build -tags=example ./... + go build ./... diff --git a/.builds/arch.yml b/.builds/arch.yml index 6b620e265..5ec476f69 100644 --- a/.builds/arch.yml +++ b/.builds/arch.yml @@ -13,4 +13,4 @@ sources: tasks: - build: | cd ebiten - go build -tags=example ./... + go build ./... diff --git a/.builds/fedora.yml b/.builds/fedora.yml index 296ac5558..8fcf3c8ff 100644 --- a/.builds/fedora.yml +++ b/.builds/fedora.yml @@ -15,4 +15,4 @@ sources: tasks: - build: | cd ebiten - go build -tags=example ./... + go build ./... diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index 8a3e2c369..82a2adf82 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -13,4 +13,4 @@ sources: tasks: - build: | cd ebiten - go build -tags=example ./... + go build ./... diff --git a/.builds/ubuntu.yml b/.builds/ubuntu.yml index 4c5e60bd0..2d6eaaac4 100644 --- a/.builds/ubuntu.yml +++ b/.builds/ubuntu.yml @@ -16,4 +16,4 @@ sources: tasks: - build: | cd ebiten - go build -tags=example ./... + go build ./... diff --git a/.github/workflows/steam.sh b/.github/workflows/steam.sh index ee21902c1..a170f8eea 100644 --- a/.github/workflows/steam.sh +++ b/.github/workflows/steam.sh @@ -10,4 +10,4 @@ rm -rf /usr/local/go && tar -C /usr/local -xzf ${GO_FILENAME} Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & # Run the tests -go test -tags=example -v ./... +go test -v ./... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 285989ef7..4de1691eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,32 +64,32 @@ jobs: - name: go vet run: | - go list -tags=example ./... | grep -v -x -F -f .github/workflows/govetblock.txt | xargs go vet -tags=example + go list ./... | grep -v -x -F -f .github/workflows/govetblock.txt | xargs go vet - name: go vet (vettool) run: | (cd .github/workflows/vettools; go install .) - go vet -vettool=$(which vettools)${{ startsWith(matrix.os, 'windows-') && '.exe' || '' }} -tags=example -v ./... + go vet -vettool=$(which vettools)${{ startsWith(matrix.os, 'windows-') && '.exe' || '' }} -v ./... - name: go build run: | - go build -tags=example -v ./... + go build -v ./... # Compile without optimization to check potential stack overflow. # The option '-gcflags=all=-N -l' is often used at Visual Studio Code. # See also https://go.googlesource.com/vscode-go/+/HEAD/docs/debugging.md#launch and the issue #2120. - go build -tags=example "-gcflags=all=-N -l" -v ./... - env GOOS=js GOARCH=wasm go build -tags=example -v ./... - env GOOS=windows GOARCH=386 go build -tags=example -v ./... - env GOOS=windows GOARCH=amd64 go build -tags=example -v ./... - env GOOS=windows GOARCH=arm go build -tags=example -v ./... - env GOOS=windows GOARCH=arm64 go build -tags=example -v ./... + go build "-gcflags=all=-N -l" -v ./... + env GOOS=js GOARCH=wasm go build -v ./... + env GOOS=windows GOARCH=386 go build -v ./... + env GOOS=windows GOARCH=amd64 go build -v ./... + env GOOS=windows GOARCH=arm go build -v ./... + env GOOS=windows GOARCH=arm64 go build -v ./... - name: go build (macOS) if: ${{ startsWith(matrix.os, 'macos-') }} run: | - env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -tags=example -v ./... - env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -tags=example -o flappy_amd64 -v ./examples/flappy - env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -tags=example -o flappy_arm64 -v ./examples/flappy + env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -v ./... + env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o flappy_amd64 -v ./examples/flappy + env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o flappy_arm64 -v ./examples/flappy lipo -create flappy_amd64 flappy_arm64 -output flappy file flappy rm flappy @@ -97,8 +97,8 @@ jobs: - name: go build (NintendoSDK) if: ${{ startsWith(matrix.os, 'ubuntu-') }} run: | - go build -tags=example,nintendosdk -v ./... - go build -tags=example,ebitencbackend -v ./... # For backward compatibility. Remove this in the future (#2190). + go build -tags=nintendosdk -v ./... + go build -tags=ebitencbackend -v ./... # For backward compatibility. Remove this in the future (#2190). - name: go mod vendor run: | @@ -121,7 +121,7 @@ jobs: # TODO: Add more test environments (#1305) if: ${{ startsWith(matrix.os, 'ubuntu-') || startsWith(matrix.os, 'windows-') }} run: | - go test -tags=example -shuffle=on -v ./... + go test -shuffle=on -v ./... - name: go test (Linux 386) if: ${{ startsWith(matrix.os, 'ubuntu-') }} @@ -130,23 +130,23 @@ jobs: sudo apt-get update sudo apt-get install gcc-multilib sudo apt-get install libasound2-dev:i386 libgl1-mesa-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxinerama-dev:i386 libxrandr-dev:i386 libxxf86vm-dev:i386 - env CGO_ENABLED=1 GOARCH=386 go test -tags=example -shuffle=on -v ./... + env CGO_ENABLED=1 GOARCH=386 go test -shuffle=on -v ./... - name: go test (Linux OpenGL ES) if: ${{ startsWith(matrix.os, 'ubuntu-') }} run: | sudo apt-get install libgles2-mesa-dev - env EBITENGINE_GRAPHICS_LIBRARY=opengl go test -tags=example,opengles -shuffle=on -v ./... + env EBITENGINE_GRAPHICS_LIBRARY=opengl go test -tags=opengles -shuffle=on -v ./... - name: go test (Windows 386) if: ${{ startsWith(matrix.os, 'windows-') }} run: | - env GOARCH=386 go test -tags=example -shuffle=on -v ./... + env GOARCH=386 go test -shuffle=on -v ./... - name: go test (Wasm) run: | - env GOOS=js GOARCH=wasm go test -tags=example -shuffle=on -v ./... - env GOOS=js GOARCH=wasm EBITENGINE_OPENGL=webgl1 go test -tags=example -shuffle=on -v ./... + env GOOS=js GOARCH=wasm go test -shuffle=on -v ./... + env GOOS=js GOARCH=wasm EBITENGINE_OPENGL=webgl1 go test -shuffle=on -v ./... - name: Install ebitenmobile run: | diff --git a/.github/workflows/vuln.yml b/.github/workflows/vuln.yml index 3f26bd951..868841fdb 100644 --- a/.github/workflows/vuln.yml +++ b/.github/workflows/vuln.yml @@ -43,5 +43,5 @@ jobs: - name: govulncheck run: | - govulncheck -tags=example ./... - env GOOS=js GOARCH=wasm govulncheck -tags=example ./... + govulncheck ./... + env GOOS=js GOARCH=wasm govulncheck ./... diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cafa5340d..48ac60c6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,14 +45,6 @@ For example, formatting by `go fmt` is required. You don't have to update existing files' license comments. -## Adding build tags for examples - -```go -//go:build example -``` - -`example` is to prevent from installing executions by `go get github.com/hajimehoshi/ebiten/v2/...`. - ## Implementation details See the [documents](https://ebitengine.org/en/documents/implementation.html) about internal implementation. diff --git a/examples/2048/main.go b/examples/2048/main.go index a02ed7ec1..f0d0a1290 100644 --- a/examples/2048/main.go +++ b/examples/2048/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/README.md b/examples/README.md index 6d3b2632e..494ae5b1c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,7 +3,7 @@ ## Desktops ```sh -go run -tags=example github.com/hajimehoshi/ebiten/v2/examples/rotate +go run github.com/hajimehoshi/ebiten/v2/examples/rotate@latest ``` ## Android @@ -11,13 +11,13 @@ go run -tags=example github.com/hajimehoshi/ebiten/v2/examples/rotate Install [gomobile](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile) first. ```sh -gomobile install -tags=example github.com/hajimehoshi/ebiten/v2/examples/rotate +gomobile install github.com/hajimehoshi/ebiten/v2/examples/rotate@latest ``` ## iOS ```sh -gomobile build -target=ios -tags=example -work github.com/hajimehoshi/ebiten/v2/examples/rotate +gomobile build -target=ios -work github.com/hajimehoshi/ebiten/v2/examples/rotate@latest ``` Then, open the `WORK` directory, open `main.xcodeproj`, add signing, and run the project. diff --git a/examples/additive/main.go b/examples/additive/main.go index a4452aa06..f0a021fbd 100644 --- a/examples/additive/main.go +++ b/examples/additive/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/address/main.go b/examples/address/main.go index 184f109ed..6ba55810e 100644 --- a/examples/address/main.go +++ b/examples/address/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/airship/main.go b/examples/airship/main.go index 3e2e2e59c..f3361bcec 100644 --- a/examples/airship/main.go +++ b/examples/airship/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/alphablending/main.go b/examples/alphablending/main.go index f02071898..82bb0b462 100644 --- a/examples/alphablending/main.go +++ b/examples/alphablending/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/animation/main.go b/examples/animation/main.go index 1b9cef145..36b3a747a 100644 --- a/examples/animation/main.go +++ b/examples/animation/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/audio/main.go b/examples/audio/main.go index ce0196176..d6ccdea32 100644 --- a/examples/audio/main.go +++ b/examples/audio/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - // This is an example to implement an audio player. // See examples/wav for a simpler example to play a sound file. diff --git a/examples/audioinfiniteloop/main.go b/examples/audioinfiniteloop/main.go index e49fc7517..b924f7963 100644 --- a/examples/audioinfiniteloop/main.go +++ b/examples/audioinfiniteloop/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/audiopanning/main.go b/examples/audiopanning/main.go index eb52bc90d..10e1224c0 100644 --- a/examples/audiopanning/main.go +++ b/examples/audiopanning/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/blocks/main.go b/examples/blocks/main.go index cee7259d6..e914837b6 100644 --- a/examples/blocks/main.go +++ b/examples/blocks/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/blur/main.go b/examples/blur/main.go index 7523fa088..6cf18b188 100644 --- a/examples/blur/main.go +++ b/examples/blur/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/camera/main.go b/examples/camera/main.go index 3a8c66213..7fae7618d 100644 --- a/examples/camera/main.go +++ b/examples/camera/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/chipmunk/main.go b/examples/chipmunk/main.go index d6904a531..cee1f3c5f 100644 --- a/examples/chipmunk/main.go +++ b/examples/chipmunk/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/clip/main.go b/examples/clip/main.go index d788cd514..e4da10419 100644 --- a/examples/clip/main.go +++ b/examples/clip/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/contextlost/context_js.go b/examples/contextlost/context_js.go index 11f26b0d2..f301d60df 100644 --- a/examples/contextlost/context_js.go +++ b/examples/contextlost/context_js.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/contextlost/context_notjs.go b/examples/contextlost/context_notjs.go index 0bca66f59..f5af67022 100644 --- a/examples/contextlost/context_notjs.go +++ b/examples/contextlost/context_notjs.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example && !js +//go:build !js package main diff --git a/examples/contextlost/main.go b/examples/contextlost/main.go index 5fe8cc491..958f324b9 100644 --- a/examples/contextlost/main.go +++ b/examples/contextlost/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/cursor/main.go b/examples/cursor/main.go index 9162d6993..841ad6244 100644 --- a/examples/cursor/main.go +++ b/examples/cursor/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/doomfire/main.go b/examples/doomfire/main.go index 7551e1cda..e27e333db 100644 --- a/examples/doomfire/main.go +++ b/examples/doomfire/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/drag/main.go b/examples/drag/main.go index a306b2b7a..470f22d7b 100644 --- a/examples/drag/main.go +++ b/examples/drag/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/filter/main.go b/examples/filter/main.go index 563e41d80..a19f6107a 100644 --- a/examples/filter/main.go +++ b/examples/filter/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/flappy/main.go b/examples/flappy/main.go index a072b51b8..df2e03859 100644 --- a/examples/flappy/main.go +++ b/examples/flappy/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/flappy/main_c.go b/examples/flappy/main_c.go index a3a0f4259..79d5e570d 100644 --- a/examples/flappy/main_c.go +++ b/examples/flappy/main_c.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example && (microsoftgdk || nintendosdk) +//go:build microsoftgdk || nintendosdk // This file is for some special environments using 'microsoftgdk' or 'nintendosdk'. // You usually don't have to care about this file. diff --git a/examples/flood/main.go b/examples/flood/main.go index 694316ac8..5c9d7f7ee 100644 --- a/examples/flood/main.go +++ b/examples/flood/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/font/main.go b/examples/font/main.go index b8dccb19e..df0679bb5 100644 --- a/examples/font/main.go +++ b/examples/font/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/fullscreen/main.go b/examples/fullscreen/main.go index 5865c480a..6e9f5e3b2 100644 --- a/examples/fullscreen/main.go +++ b/examples/fullscreen/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/gamepad/main.go b/examples/gamepad/main.go index c314cb339..e6af23351 100644 --- a/examples/gamepad/main.go +++ b/examples/gamepad/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/highdpi/main.go b/examples/highdpi/main.go index 2466b70b6..696cb156c 100644 --- a/examples/highdpi/main.go +++ b/examples/highdpi/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/hsv/main.go b/examples/hsv/main.go index 262a13c3e..163139fa7 100644 --- a/examples/hsv/main.go +++ b/examples/hsv/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/hue/main.go b/examples/hue/main.go index 77f2c568d..934d6a5ac 100644 --- a/examples/hue/main.go +++ b/examples/hue/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/infinitescroll/main.go b/examples/infinitescroll/main.go index 990e435ae..2944b19d1 100644 --- a/examples/infinitescroll/main.go +++ b/examples/infinitescroll/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/isometric/game.go b/examples/isometric/game.go index 7c3a6ddd8..322804f3d 100644 --- a/examples/isometric/game.go +++ b/examples/isometric/game.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/isometric/level.go b/examples/isometric/level.go index 5d523ffcc..1f0539af4 100644 --- a/examples/isometric/level.go +++ b/examples/isometric/level.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/isometric/main.go b/examples/isometric/main.go index 07162127e..31532ba34 100644 --- a/examples/isometric/main.go +++ b/examples/isometric/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/isometric/spritesheet.go b/examples/isometric/spritesheet.go index 1283e0115..da1a0e3e9 100644 --- a/examples/isometric/spritesheet.go +++ b/examples/isometric/spritesheet.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/isometric/tile.go b/examples/isometric/tile.go index 666805434..5e53171d8 100644 --- a/examples/isometric/tile.go +++ b/examples/isometric/tile.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/keyboard/main.go b/examples/keyboard/main.go index b2244621d..db493f7ee 100644 --- a/examples/keyboard/main.go +++ b/examples/keyboard/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/lasttouch/main.go b/examples/lasttouch/main.go index 2f0134d14..21a1f3c2a 100644 --- a/examples/lasttouch/main.go +++ b/examples/lasttouch/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/life/main.go b/examples/life/main.go index 0f8ee05f9..ded747726 100644 --- a/examples/life/main.go +++ b/examples/life/main.go @@ -21,8 +21,6 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//go:build example - package main import ( diff --git a/examples/mandelbrot/main.go b/examples/mandelbrot/main.go index cf4e7d543..f2ca4bb7f 100644 --- a/examples/mandelbrot/main.go +++ b/examples/mandelbrot/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/mascot/main.go b/examples/mascot/main.go index 5b7c8ebe6..b420a43db 100644 --- a/examples/mascot/main.go +++ b/examples/mascot/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - // Mascot is a desktop mascot on cross platforms. // This is inspired by mattn's gopher (https://github.com/mattn/gopher). package main diff --git a/examples/masking/main.go b/examples/masking/main.go index 085b7acf8..24474de93 100644 --- a/examples/masking/main.go +++ b/examples/masking/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/minify/main.go b/examples/minify/main.go index 194ac6ac8..e924d540f 100644 --- a/examples/minify/main.go +++ b/examples/minify/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - // This example is an experiment to minify images with various filters. // When linear filter is used, mipmap images should be used for high-quality rendering (#578). diff --git a/examples/moire/main.go b/examples/moire/main.go index ebf1c6355..e8c78893c 100644 --- a/examples/moire/main.go +++ b/examples/moire/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - // This example is just to check if Ebitengine can draw fine checker pattern evenly. // If there is something wrong in the implementation, the result might include // uneven patterns (#459). diff --git a/examples/mosaic/main.go b/examples/mosaic/main.go index 6642ae357..f9ad6faf5 100644 --- a/examples/mosaic/main.go +++ b/examples/mosaic/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/noise/main.go b/examples/noise/main.go index 5bcdf5bf9..0bf33c55f 100644 --- a/examples/noise/main.go +++ b/examples/noise/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/paint/main.go b/examples/paint/main.go index f13847197..563652312 100644 --- a/examples/paint/main.go +++ b/examples/paint/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/particles/main.go b/examples/particles/main.go index d09d1a6a7..9a57a78b5 100644 --- a/examples/particles/main.go +++ b/examples/particles/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/pcm/main.go b/examples/pcm/main.go index 9d71433de..423dacd56 100644 --- a/examples/pcm/main.go +++ b/examples/pcm/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/perspective/main.go b/examples/perspective/main.go index e124ae3ee..bc30055d3 100644 --- a/examples/perspective/main.go +++ b/examples/perspective/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/piano/main.go b/examples/piano/main.go index f867d8124..5e23c6990 100644 --- a/examples/piano/main.go +++ b/examples/piano/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/platformer/main.go b/examples/platformer/main.go index 8ac8d2faf..2c903e647 100644 --- a/examples/platformer/main.go +++ b/examples/platformer/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/polygons/main.go b/examples/polygons/main.go index 4efbcb247..3e602b2cb 100644 --- a/examples/polygons/main.go +++ b/examples/polygons/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/raycasting/main.go b/examples/raycasting/main.go index d17bdbe70..edae19af4 100644 --- a/examples/raycasting/main.go +++ b/examples/raycasting/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/realtimepcm/main.go b/examples/realtimepcm/main.go index e66a29384..7f27544ba 100644 --- a/examples/realtimepcm/main.go +++ b/examples/realtimepcm/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/rotate/main.go b/examples/rotate/main.go index e2dfbf777..23af2bafc 100644 --- a/examples/rotate/main.go +++ b/examples/rotate/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/set/main.go b/examples/set/main.go index fcae28a72..af97515cb 100644 --- a/examples/set/main.go +++ b/examples/set/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/shader/main.go b/examples/shader/main.go index 017b1b0ad..a532b8f7d 100644 --- a/examples/shader/main.go +++ b/examples/shader/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/shapes/main.go b/examples/shapes/main.go index e9d4e3522..8f17c2488 100644 --- a/examples/shapes/main.go +++ b/examples/shapes/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/sinewave/main.go b/examples/sinewave/main.go index cc09cc6ef..e43b6eb16 100644 --- a/examples/sinewave/main.go +++ b/examples/sinewave/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/skipdraw/main.go b/examples/skipdraw/main.go index 0a7e66f03..cd9464b68 100644 --- a/examples/skipdraw/main.go +++ b/examples/skipdraw/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/snake/main.go b/examples/snake/main.go index f843573f2..c9171a014 100644 --- a/examples/snake/main.go +++ b/examples/snake/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/sprites/main.go b/examples/sprites/main.go index f2a1017d5..ac1397cec 100644 --- a/examples/sprites/main.go +++ b/examples/sprites/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/spriteshd/main.go b/examples/spriteshd/main.go index ff330dbc2..73c4c6af0 100644 --- a/examples/spriteshd/main.go +++ b/examples/spriteshd/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/squiral/main.go b/examples/squiral/main.go index 61947d960..3c5bc83be 100644 --- a/examples/squiral/main.go +++ b/examples/squiral/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - // This demo is inspired by the xscreensaver 'squirals'. package main diff --git a/examples/stars/main.go b/examples/stars/main.go index 9bb96c925..3e9823a68 100644 --- a/examples/stars/main.go +++ b/examples/stars/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/text/main.go b/examples/text/main.go index 60a82d60a..b91f55f50 100644 --- a/examples/text/main.go +++ b/examples/text/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/tiles/main.go b/examples/tiles/main.go index 2f822d486..fa58dce02 100644 --- a/examples/tiles/main.go +++ b/examples/tiles/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/touch/main.go b/examples/touch/main.go index 48f8d5651..9b6df382e 100644 --- a/examples/touch/main.go +++ b/examples/touch/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/typewriter/main.go b/examples/typewriter/main.go index 2f3207365..1f7eee43f 100644 --- a/examples/typewriter/main.go +++ b/examples/typewriter/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/ui/main.go b/examples/ui/main.go index f2a2bfb3c..8835863f8 100644 --- a/examples/ui/main.go +++ b/examples/ui/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/vector/main.go b/examples/vector/main.go index da15346e5..cce7b663d 100644 --- a/examples/vector/main.go +++ b/examples/vector/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/vibrate/main.go b/examples/vibrate/main.go index a55fc0b6e..cc5bdc3e3 100644 --- a/examples/vibrate/main.go +++ b/examples/vibrate/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/wav/main.go b/examples/wav/main.go index 62607262a..6f9769bdc 100644 --- a/examples/wav/main.go +++ b/examples/wav/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/wheel/main.go b/examples/wheel/main.go index 90482beab..d7fcb5082 100644 --- a/examples/wheel/main.go +++ b/examples/wheel/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/windowclosing/main.go b/examples/windowclosing/main.go index 1da6803e8..88143a621 100644 --- a/examples/windowclosing/main.go +++ b/examples/windowclosing/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import ( diff --git a/examples/windowsize/main.go b/examples/windowsize/main.go index 9e3514b90..81f408fd1 100644 --- a/examples/windowsize/main.go +++ b/examples/windowsize/main.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example - package main import (