Pārlūkot izejas kodu

codec: clean up use of appengine and safe build tags

First, in build constraints, 'safe' is synonymous with 'appengine'.
Ensure this is honored in the build constraints.

Then, use the following logic to handle treatment of safe tags,
as they show in files.

  < go 1.7                === helper_not_unsafe.go
  go1.7+, safe tag        === helper_not_unsafe.go

  go1.7-1.11, safe tag    === goversion_maprange_lt_go112.go
  go1.12+, safe tag       === goversion_maprange_gte_go112.go
  go1.7+, NO safe tag     === helper_unsafe.go

Fixes #310
Ugorji Nwoke 6 gadi atpakaļ
vecāks
revīzija
e118e2d506

+ 1 - 1
codec/goversion_maprange_gte_go112.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT license found in the LICENSE file.
 
 // +build go1.12
-// +build safe
+// +build safe appengine
 
 package codec
 

+ 2 - 1
codec/goversion_maprange_lt_go112.go

@@ -1,8 +1,9 @@
 // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
 // Use of this source code is governed by a MIT license found in the LICENSE file.
 
+// +build go1.7
 // +build !go1.12
-// +build !go1.7 safe
+// +build safe appengine
 
 package codec