]> Cypherpunks repositories - gostls13.git/commitdiff
net/http, net/internal, net/smtp: add wasip1
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Sat, 25 Mar 2023 23:38:37 +0000 (16:38 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 11 Apr 2023 20:54:10 +0000 (20:54 +0000)
For #58141

Co-authored-by: Richard Musiol <neelance@gmail.com>
Co-authored-by: Achille Roussel <achille.roussel@gmail.com>
Co-authored-by: Julien Fabre <ju.pryz@gmail.com>
Co-authored-by: Evan Phoenix <evan@phx.io>
Change-Id: Ib49b7ccabe18de544455f7d09c7d715d6564a73d
Reviewed-on: https://go-review.googlesource.com/c/go/+/479625
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/net/http/roundtrip.go
src/net/http/transport_default_other.go
src/net/http/transport_default_wasm.go [moved from src/net/http/transport_default_js.go with 89% similarity]
src/net/internal/socktest/main_test.go
src/net/internal/socktest/main_unix_test.go
src/net/internal/socktest/switch_unix.go
src/net/internal/socktest/sys_unix.go
src/net/smtp/smtp_test.go

index c4c5d3b6ebb3dd67786808e8885876fcfe036a52..49ea1a71ed9d096ad5251a62ad4b7ffbd6dd047f 100644 (file)
@@ -2,7 +2,7 @@
 // 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
 
 package http
 
index 8a2f1cc42bbcf5422f0adfdb0416aa61edaeb997..4f6c5c1271144bb5dc01d8b197680457937d7d40 100644 (file)
@@ -2,8 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !(js && wasm)
-// +build !js !wasm
+//go:build !wasm
 
 package http
 
similarity index 89%
rename from src/net/http/transport_default_js.go
rename to src/net/http/transport_default_wasm.go
index c07d35ef861ebc2a8c56288b46b8fbb949a5e23e..3946812d7441b8ea5a426924c2ca764d5910d6be 100644 (file)
@@ -2,8 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build js && wasm
-// +build js,wasm
+//go:build (js && wasm) || wasip1
 
 package http
 
index c7c8d16d4c9a7e0435994022eae9ed7f7f252daf..0197feb3f199aa72ee2e90e03ea9cf888deb6fd5 100644 (file)
@@ -2,7 +2,7 @@
 // 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 socktest_test
 
index 7d21f6f99f6baadfa6735a23a09444c9a640efd7..19ffb28bb9c7d35b214926e24485389e756356f9 100644 (file)
@@ -2,7 +2,7 @@
 // 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 socktest_test
 
index f2e95d68c17f4c4deb2947438604cd860b62085e..ff92877648136a7b95f8d28fa3edc7579878c04f 100644 (file)
@@ -2,7 +2,7 @@
 // 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 socktest
 
index e1040d3087a944e099cc7f039126960464d86924..712462abf41e1065c3bdfcca249776b740489143 100644 (file)
@@ -2,7 +2,7 @@
 // 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 socktest
 
index dba074436b6097e02b0a230d4272025159024aa6..259b10b93d9e36a7bc8d1fa060bd01aea1834d02 100644 (file)
@@ -948,7 +948,7 @@ QUIT
 `
 
 func TestTLSClient(t *testing.T) {
-       if runtime.GOOS == "freebsd" || runtime.GOOS == "js" {
+       if runtime.GOOS == "freebsd" || runtime.GOOS == "js" || runtime.GOOS == "wasip1" {
                testenv.SkipFlaky(t, 19229)
        }
        ln := newLocalListener(t)