Skip to content

Commit dda510a

Browse files
adgdsymonds
authored andcommitted
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.
1 parent 8d92cf5 commit dda510a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

proto/pointer_reflect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3030
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131

32-
// +build appengine
32+
// +build appengine js
3333

3434
// This file contains an implementation of proto field accesses using package reflect.
3535
// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can

proto/pointer_unsafe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3030
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131

32-
// +build !appengine
32+
// +build !appengine,!js
3333

3434
// This file contains the implementation of the proto field accesses using package unsafe.
3535

0 commit comments

Comments
 (0)