summaryrefslogtreecommitdiff
path: root/spew/bypasssafe.go
diff options
context:
space:
mode:
authorRoger Peppe <[email protected]>2018-01-29 09:57:49 +0000
committerDave Collins <[email protected]>2018-02-03 01:28:59 -0600
commit87df7c60d5820d0f8ae11afede5aa52325c09717 (patch)
treecb1baccb5f0358afe3a3b92dd476e917e233f44c /spew/bypasssafe.go
parentdb69d09d2c587e9b9677f991dfcab1fc24d9086e (diff)
simpler, more robust bypass
We make the bypass implementation a little simpler by inferring the flag field position from available reflect information and more robust by checking that the flags that are set actually match the semantics we expect. We can restrict the use of unsafe to a single function: flagField.
Diffstat (limited to 'spew/bypasssafe.go')
-rw-r--r--spew/bypasssafe.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/spew/bypasssafe.go b/spew/bypasssafe.go
index 1fe3cf3..205c28d 100644
--- a/spew/bypasssafe.go
+++ b/spew/bypasssafe.go
@@ -16,7 +16,7 @@
// when the code is running on Google App Engine, compiled by GopherJS, or
// "-tags safe" is added to the go build command line. The "disableunsafe"
// tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe
+// +build js appengine safe disableunsafe !go1.4
package spew