// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// This file implements API tests across platforms and will never have a build
// tag.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
// DNS client: see RFC 1035.
// Has to be linked into package net for Dial.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js && !windows
+//go:build !js && !wasip1 && !windows
// Read system DNS config from /etc/resolv.conf
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm) || windows
+//go:build unix || (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || js
+//go:build unix || js || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build js && wasm
+//go:build (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm)
+//go:build unix || (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build js && wasm
+//go:build (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm) || windows
+//go:build unix || (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm) || windows
+//go:build unix || (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js && !plan9
+//go:build !js && !plan9 && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build js && wasm
+//go:build (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js && !plan9
+//go:build !js && !plan9 && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (js && wasm) || plan9
+//go:build (js && wasm) || plan9 || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js && !plan9
+//go:build !js && !plan9 && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Fake networking for js/wasm. It is intended to allow tests of other package to pass.
+// Fake networking for js/wasm and wasip1/wasm. It is intended to allow tests of other package to pass.
-//go:build js && wasm
+//go:build (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// This file implements API tests across platforms and will never have a build
// tag.
-//go:build !js
+//go:build !js && !wasip1
package net
)
func TestReadLine(t *testing.T) {
- // /etc/services file does not exist on android, plan9, windows.
+ // /etc/services file does not exist on android, plan9, windows, or wasip1
+ // where it would be required to be mounted from the host file system.
switch runtime.GOOS {
- case "android", "plan9", "windows":
+ case "android", "plan9", "windows", "wasip1":
t.Skipf("not supported on %s", runtime.GOOS)
}
filename := "/etc/services" // a nice big file
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm)
+//go:build unix || (js && wasm) || wasip1
// Read system port mappings from /etc/services
// This file implements API tests across platforms and will never have a build
// tag.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (js && wasm) || plan9
+//go:build (js && wasm) || plan9 || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
// Test that Resolver.Dial can be a func returning an in-memory net.Conn
// speaking DNS.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build aix || (js && wasm) || netbsd || openbsd || ios
+//go:build aix || (js && wasm) || netbsd || openbsd || ios || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build aix || (js && wasm) || solaris
+//go:build aix || (js && wasm) || solaris || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm) || windows
+//go:build unix || (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build js && wasm
+//go:build (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build js && wasm
+//go:build (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm) || windows
+//go:build unix || (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js && !plan9 && !windows
+//go:build !js && !plan9 && !wasip1 && !windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build js && wasm
+//go:build (js && wasm) || wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm) || windows
+//go:build unix || (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net
"time"
)
-// BUG(mikio): On JS and Plan 9, methods and functions related
+// BUG(mikio): On JS, WASIP1 and Plan 9, methods and functions related
// to UnixConn and UnixListener are not implemented.
// BUG(mikio): On Windows, methods and functions related to UnixConn
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build unix || (js && wasm) || windows
+//go:build unix || (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (js && wasm) || windows
+//go:build (js && wasm) || wasip1 || windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js && !plan9 && !windows
+//go:build !js && !plan9 && !wasip1 && !windows
package net
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !js
+//go:build !js && !wasip1
package net