Преглед на файлове

Use reflection-driven field accesses under GopherJS.

Like App Engine, GopherJS does not support unsafe.
This change adds a 'js' build tag (set by GopherJS)
alongside the existing 'appengine' tags.

Fixes #154.
Andrew Gerrand преди 9 години
родител
ревизия
dda510ac0f
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      proto/pointer_reflect.go
  2. 1 1
      proto/pointer_unsafe.go

+ 1 - 1
proto/pointer_reflect.go

@@ -29,7 +29,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// +build appengine
+// +build appengine js
 
 // This file contains an implementation of proto field accesses using package reflect.
 // It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can

+ 1 - 1
proto/pointer_unsafe.go

@@ -29,7 +29,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// +build !appengine
+// +build !appengine,!js
 
 // This file contains the implementation of the proto field accesses using package unsafe.