From 49a82fefe311be8d7dadba6ef38425bf31c663e4 Mon Sep 17 00:00:00 2001 From: Hana Kim Date: Fri, 21 Aug 2015 17:36:09 -0400 Subject: [PATCH] all: support go get golang.org/x/mobile/... on Windows Fixes golang/go#12212 Workaround for golang/go#12261 until golang/go#9306 is fixed. Change-Id: I51c1bcfc92c1553fe2132586a0234b1c1af6aeb1 Reviewed-on: https://go-review.googlesource.com/13745 Reviewed-by: David Crawshaw --- asset/asset.go | 12 ------------ asset/doc.go | 17 +++++++++++++++++ bind/java/testpkg/testpkg.go | 2 ++ example/audio/main_x.go | 10 ++++++++++ example/basic/main_x.go | 10 ++++++++++ example/network/main_x.go | 10 ++++++++++ example/sprite/main_x.go | 10 ++++++++++ exp/app/debug/fps.go | 2 ++ exp/gl/glutil/doc.go | 6 ++++++ exp/gl/glutil/glutil.go | 3 ++- exp/sensor/sensor.go | 2 ++ exp/sprite/glsprite/glsprite.go | 2 ++ gl/work.c | 2 ++ 13 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 asset/doc.go create mode 100644 example/audio/main_x.go create mode 100644 example/basic/main_x.go create mode 100644 example/network/main_x.go create mode 100644 example/sprite/main_x.go create mode 100644 exp/gl/glutil/doc.go diff --git a/asset/asset.go b/asset/asset.go index d17c0f9..90a2bb2 100644 --- a/asset/asset.go +++ b/asset/asset.go @@ -4,18 +4,6 @@ // +build darwin linux -// Package asset provides access to application-bundled assets. -// -// On Android, assets are accessed via android.content.res.AssetManager. -// These files are stored in the assets/ directory of the app. Any raw asset -// can be accessed by its direct relative name. For example assets/img.png -// can be opened with Open("img.png"). -// -// On iOS an asset is a resource stored in the application bundle. -// Resources can be loaded using the same relative paths. -// -// For consistency when debugging on a desktop, assets are read from a -// directory named assets under the current working directory. package asset import "io" diff --git a/asset/doc.go b/asset/doc.go new file mode 100644 index 0000000..37bb9bb --- /dev/null +++ b/asset/doc.go @@ -0,0 +1,17 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package asset provides access to application-bundled assets. +// +// On Android, assets are accessed via android.content.res.AssetManager. +// These files are stored in the assets/ directory of the app. Any raw asset +// can be accessed by its direct relative name. For example assets/img.png +// can be opened with Open("img.png"). +// +// On iOS an asset is a resource stored in the application bundle. +// Resources can be loaded using the same relative paths. +// +// For consistency when debugging on a desktop, assets are read from a +// directory named assets under the current working directory. +package asset diff --git a/bind/java/testpkg/testpkg.go b/bind/java/testpkg/testpkg.go index fd795e4..4d59c39 100644 --- a/bind/java/testpkg/testpkg.go +++ b/bind/java/testpkg/testpkg.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin linux + // Package testpkg contains bound functions for testing the cgo-JNI interface. // This is used in tests of golang.org/x/mobile/bind/java. package testpkg diff --git a/example/audio/main_x.go b/example/audio/main_x.go new file mode 100644 index 0000000..e528533 --- /dev/null +++ b/example/audio/main_x.go @@ -0,0 +1,10 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!linux + +package main + +func main() { +} diff --git a/example/basic/main_x.go b/example/basic/main_x.go new file mode 100644 index 0000000..3d440e7 --- /dev/null +++ b/example/basic/main_x.go @@ -0,0 +1,10 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!linux + +package main + +func main() { +} diff --git a/example/network/main_x.go b/example/network/main_x.go new file mode 100644 index 0000000..e528533 --- /dev/null +++ b/example/network/main_x.go @@ -0,0 +1,10 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!linux + +package main + +func main() { +} diff --git a/example/sprite/main_x.go b/example/sprite/main_x.go new file mode 100644 index 0000000..3d440e7 --- /dev/null +++ b/example/sprite/main_x.go @@ -0,0 +1,10 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!linux + +package main + +func main() { +} diff --git a/exp/app/debug/fps.go b/exp/app/debug/fps.go index fbd371b..d90d60f 100644 --- a/exp/app/debug/fps.go +++ b/exp/app/debug/fps.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin linux + // Package debug provides GL-based debugging tools for apps. package debug // import "golang.org/x/mobile/exp/app/debug" diff --git a/exp/gl/glutil/doc.go b/exp/gl/glutil/doc.go new file mode 100644 index 0000000..44b1210 --- /dev/null +++ b/exp/gl/glutil/doc.go @@ -0,0 +1,6 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package glutil implements OpenGL utility functions. +package glutil // import "golang.org/x/mobile/exp/gl/glutil" diff --git a/exp/gl/glutil/glutil.go b/exp/gl/glutil/glutil.go index babb1c9..2ac6c87 100644 --- a/exp/gl/glutil/glutil.go +++ b/exp/gl/glutil/glutil.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package glutil implements OpenGL utility functions. +// +build darwin linux + package glutil // import "golang.org/x/mobile/exp/gl/glutil" import ( diff --git a/exp/sensor/sensor.go b/exp/sensor/sensor.go index 8e93feb..8745c29 100644 --- a/exp/sensor/sensor.go +++ b/exp/sensor/sensor.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin linux + // Package sensor provides sensor events from various movement sensors. package sensor // import "golang.org/x/mobile/exp/sensor" diff --git a/exp/sprite/glsprite/glsprite.go b/exp/sprite/glsprite/glsprite.go index 6d1395a..b335996 100644 --- a/exp/sprite/glsprite/glsprite.go +++ b/exp/sprite/glsprite/glsprite.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin linux + // Package glsprite implements a sprite Engine using OpenGL ES 2. // // Each sprite.Texture is loaded as a GL texture object and drawn diff --git a/gl/work.c b/gl/work.c index cdea4e5..eb5802b 100644 --- a/gl/work.c +++ b/gl/work.c @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin linux + #include #include "_cgo_export.h" #include "work.h"