From 027ef33fe27e9dba66809812d239965b9c557d37 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 12 Oct 2024 14:07:13 +0900 Subject: [PATCH] all: rename files This change makes the file name convention consistent. A file for macOS, not for iOS should have a suffix '_macos.go' rather than '_macos_darwin.go' and/or '_darwin.go'. --- internal/gamepaddb/{db_macos_darwin.go => db_macos.go} | 4 ++-- ...ntrollerdb_macos_darwin.txt => gamecontrollerdb_macos.txt} | 0 internal/gamepaddb/gen.go | 4 ++-- .../opengl/{graphics_darwin.go => graphics_macos.go} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename internal/gamepaddb/{db_macos_darwin.go => db_macos.go} (92%) rename internal/gamepaddb/{gamecontrollerdb_macos_darwin.txt => gamecontrollerdb_macos.txt} (100%) rename internal/graphicsdriver/opengl/{graphics_darwin.go => graphics_macos.go} (98%) diff --git a/internal/gamepaddb/db_macos_darwin.go b/internal/gamepaddb/db_macos.go similarity index 92% rename from internal/gamepaddb/db_macos_darwin.go rename to internal/gamepaddb/db_macos.go index 7c964f12f948..863a0bc8062b 100644 --- a/internal/gamepaddb/db_macos_darwin.go +++ b/internal/gamepaddb/db_macos.go @@ -14,7 +14,7 @@ // Code generated by gen.go using 'go generate'. DO NOT EDIT. -//go:build !ios +//go:build darwing && !ios package gamepaddb @@ -22,7 +22,7 @@ import ( _ "embed" ) -//go:embed gamecontrollerdb_macos_darwin.txt +//go:embed gamecontrollerdb_macos.txt var controllerBytes []byte func init() { diff --git a/internal/gamepaddb/gamecontrollerdb_macos_darwin.txt b/internal/gamepaddb/gamecontrollerdb_macos.txt similarity index 100% rename from internal/gamepaddb/gamecontrollerdb_macos_darwin.txt rename to internal/gamepaddb/gamecontrollerdb_macos.txt diff --git a/internal/gamepaddb/gen.go b/internal/gamepaddb/gen.go index e7a69fa3f3b1..0ec4df8ff6eb 100644 --- a/internal/gamepaddb/gen.go +++ b/internal/gamepaddb/gen.go @@ -112,8 +112,8 @@ func run() error { hasGLFWGamepads: true, }, "Mac OS X": { - filenameSuffix: "macos_darwin", - buildConstraints: "//go:build !ios", + filenameSuffix: "macos", + buildConstraints: "//go:build darwing && !ios", }, "Linux": { filenameSuffix: "linbsd", diff --git a/internal/graphicsdriver/opengl/graphics_darwin.go b/internal/graphicsdriver/opengl/graphics_macos.go similarity index 98% rename from internal/graphicsdriver/opengl/graphics_darwin.go rename to internal/graphicsdriver/opengl/graphics_macos.go index 123ea93a3dfb..0f8dc99a4d98 100644 --- a/internal/graphicsdriver/opengl/graphics_darwin.go +++ b/internal/graphicsdriver/opengl/graphics_macos.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !ios +//go:build darwin && !ios package opengl