ソースを参照

Disable unsafe for GopherJS compiler.

* Disable unsafe for GopherJS compiler.
* Update comments to reflect GopherJS build constraints
Jonathan Hall 9 年 前
コミット
66f99a29a0
3 ファイル変更9 行追加9 行削除
  1. 3 3
      spew/bypass.go
  2. 3 3
      spew/bypasssafe.go
  3. 3 3
      spew/internalunsafe_test.go

+ 3 - 3
spew/bypass.go

@@ -13,9 +13,9 @@
 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 // NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine and "-tags disableunsafe"
-// is not added to the go build command line.
-// +build !appengine,!disableunsafe
+// when the code is not running on Google App Engine, compiled by GopherJS, and
+// "-tags disableunsafe" is not added to the go build command line.
+// +build !appengine,!disableunsafe,!js
 
 package spew
 

+ 3 - 3
spew/bypasssafe.go

@@ -13,9 +13,9 @@
 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 // NOTE: Due to the following build constraints, this file will only be compiled
-// when either the code is running on Google App Engine or "-tags disableunsafe"
-// is added to the go build command line.
-// +build appengine disableunsafe
+// when the code is running on Google App Engine, compiled by GopherJS, or
+// "-tags disableunsafe" is added to the go build command line.
+// +build appengine disableunsafe js
 
 package spew
 

+ 3 - 3
spew/internalunsafe_test.go

@@ -13,9 +13,9 @@
 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 // NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine and "-tags disableunsafe"
-// is not added to the go build command line.
-// +build !appengine,!disableunsafe
+// when the code is not running on Google App Engine, compiled by GopherJS, and
+// "-tags disableunsafe" is not added to the go build command line.
+// +build !appengine,!disableunsafe,!js
 
 /*
 This test file is part of the spew package rather than than the spew_test