Adds support for build on GOOS=js (#1614)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -214,6 +214,8 @@ check:
|
||||
#
|
||||
# Ensure we build on plan9. See #1578
|
||||
@GOARCH=amd64 GOOS=plan9 go build ./...
|
||||
# Ensure we build on gojs. See #1526. TODO: add GOOS=wasi as well.
|
||||
@GOARCH=wasm GOOS=js go build ./...
|
||||
# Ensure we build on windows:
|
||||
@GOARCH=amd64 GOOS=windows go build ./...
|
||||
# Ensure we build on an arbitrary operating system:
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package sock
|
||||
|
||||
// plan9 doesn't declare these constants
|
||||
const (
|
||||
SHUT_RD = iota
|
||||
SHUT_RDWR
|
||||
SHUT_WR
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !plan9
|
||||
//go:build !plan9 && !js
|
||||
|
||||
package sock
|
||||
|
||||
|
||||
10
internal/sock/sock_unsupported.go
Normal file
10
internal/sock/sock_unsupported.go
Normal file
@@ -0,0 +1,10 @@
|
||||
//go:build plan9 || js
|
||||
|
||||
package sock
|
||||
|
||||
// plan9/js doesn't declare these constants
|
||||
const (
|
||||
SHUT_RD = 1 << iota
|
||||
SHUT_WR
|
||||
SHUT_RDWR = SHUT_RD | SHUT_WR
|
||||
)
|
||||
Reference in New Issue
Block a user