diff --git a/genkeys.go b/genkeys.go index c9c3a0985..9892f29ce 100644 --- a/genkeys.go +++ b/genkeys.go @@ -706,6 +706,8 @@ func main() { // Pass the build tag and extract this in the template to make `go vet` happy. buildTag := "" switch path { + case "internal/glfw/keys.go": + buildTag = "// +build !js" case "internal/uidriver/glfw/keys.go": buildTag = "// +build darwin freebsd linux windows" + "\n// +build !android" + diff --git a/internal/glfw/const.go b/internal/glfw/const.go index e7e26e09c..54099915d 100644 --- a/internal/glfw/const.go +++ b/internal/glfw/const.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build !js + package glfw import ( diff --git a/internal/glfw/generate.go b/internal/glfw/generate.go index bff747195..0e51e7cdc 100644 --- a/internal/glfw/generate.go +++ b/internal/glfw/generate.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +bulid !js + //go:generate sh ./gen.sh package glfw diff --git a/internal/glfw/glfw_notwindows.go b/internal/glfw/glfw_notwindows.go index 1a5a94bb5..4f8f5e810 100644 --- a/internal/glfw/glfw_notwindows.go +++ b/internal/glfw/glfw_notwindows.go @@ -13,6 +13,7 @@ // limitations under the License. // +build !windows +// +build !js package glfw diff --git a/internal/glfw/keys.go b/internal/glfw/keys.go index ac4eb2a3a..89c1d89b9 100644 --- a/internal/glfw/keys.go +++ b/internal/glfw/keys.go @@ -14,6 +14,8 @@ // Code generated by genkeys.go using 'go generate'. DO NOT EDIT. +// +build !js + package glfw const ( diff --git a/internal/glfw/type.go b/internal/glfw/type.go index 9cff47e06..1bf949138 100644 --- a/internal/glfw/type.go +++ b/internal/glfw/type.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build !js + package glfw type ( diff --git a/internal/graphicsdriver/opengl/gl/package.go b/internal/graphicsdriver/opengl/gl/package.go index 012a60e2e..9859b8b69 100644 --- a/internal/graphicsdriver/opengl/gl/package.go +++ b/internal/graphicsdriver/opengl/gl/package.go @@ -9,6 +9,8 @@ // This document is licensed under the SGI Free Software B License. // For details, see http://oss.sgi.com/projects/FreeB. +// +build !js + // Package gl implements Go bindings to OpenGL. package gl