aboutsummaryrefslogtreecommitdiff
path: root/src/context/example_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-11-06 11:19:37 -0500
committerGopher Robot <gobot@golang.org>2024-11-06 18:10:22 +0000
commit840ac5e037e8182444da957d0c48ffeb330d7cd2 (patch)
treef7df6d2d4aaead62f86ea4c177dd88d39a9319ed /src/context/example_test.go
parent72801623cbe4cedcb3334d31fa44ff31914a26d5 (diff)
downloadgo-840ac5e037e8182444da957d0c48ffeb330d7cd2.tar.xz
context: listen on localhost in example
Listening on ":0" triggers a Mac firewall box while the test runs. Change-Id: Ie6f8eb07eb76ea222f43bc40b1c30645294bc239 Reviewed-on: https://go-review.googlesource.com/c/go/+/625975 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/context/example_test.go')
-rw-r--r--src/context/example_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context/example_test.go b/src/context/example_test.go
index 03333b5cca..b597b09f16 100644
--- a/src/context/example_test.go
+++ b/src/context/example_test.go
@@ -205,7 +205,7 @@ func ExampleAfterFunc_connection() {
return n, err
}
- listener, err := net.Listen("tcp", ":0")
+ listener, err := net.Listen("tcp", "localhost:0")
if err != nil {
fmt.Println(err)
return