summaryrefslogtreecommitdiff
path: root/lib/go
diff options
context:
space:
mode:
authorBalázs Grill <balazs.grill@incquerylabs.com>2021-09-19 08:00:20 +0200
committerYuxuan 'fishy' Wang <fishywang@gmail.com>2021-09-20 13:43:30 -0700
commitab2f23a2a9cd8d170e6d45ae6ad0e693052e3599 (patch)
treee4f3437946f6f2b05de46ca43140c71d13040176 /lib/go
parente3be32112aa8029577b88a9ee431ef67f8a357db (diff)
downloadthrift-ab2f23a2a9cd8d170e6d45ae6ad0e693052e3599.tar.gz
Modified build tags to allow js/wasm target
Diffstat (limited to 'lib/go')
-rw-r--r--lib/go/thrift/socket_non_unix_conn.go (renamed from lib/go/thrift/socket_windows_conn.go)7
-rw-r--r--lib/go/thrift/socket_unix_conn.go3
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/go/thrift/socket_windows_conn.go b/lib/go/thrift/socket_non_unix_conn.go
index 679838c3b..75ed91dd4 100644
--- a/lib/go/thrift/socket_windows_conn.go
+++ b/lib/go/thrift/socket_non_unix_conn.go
@@ -1,4 +1,5 @@
-// +build windows
+//go:build windows || wasm
+// +build windows wasm
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -22,13 +23,13 @@
package thrift
func (sc *socketConn) read0() error {
- // On windows, we fallback to the default behavior of reading 0 bytes.
+ // On non-unix platforms, we fallback to the default behavior of reading 0 bytes.
var p []byte
_, err := sc.Conn.Read(p)
return err
}
func (sc *socketConn) checkConn() error {
- // On windows, we always return nil for this check.
+ // On non-unix platforms, we always return nil for this check.
return nil
}
diff --git a/lib/go/thrift/socket_unix_conn.go b/lib/go/thrift/socket_unix_conn.go
index f5fab3ab6..ac0dce9e8 100644
--- a/lib/go/thrift/socket_unix_conn.go
+++ b/lib/go/thrift/socket_unix_conn.go
@@ -1,4 +1,5 @@
-// +build !windows
+//go:build !windows && !wasm
+// +build !windows,!wasm
/*
* Licensed to the Apache Software Foundation (ASF) under one