Skip to content

Commit c7ab904

Browse files
committed
fix: address review feedback
- Fix 'exampels' typo in CI workflow comments - Fix README paths to use 'internal/examples/http2' - Change visibleAddr to display 0.0.0.0 for all-interface bindings
1 parent 047d1c0 commit c7ab904

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v4
1818
- uses: actions/setup-go@v5
1919
with:
20-
# HACK(mafredri): The exampels and thirdparty library require Go 1.24
20+
# HACK(mafredri): The examples and thirdparty library require Go 1.24
2121
# due to `golang.org/x/crypto` import, so lint tools must be built by
2222
# the highest version of Go used.
2323
go-version-file: ./internal/thirdparty/go.mod
@@ -30,7 +30,7 @@ jobs:
3030
- run: go version
3131
- uses: actions/setup-go@v5
3232
with:
33-
# HACK(mafredri): The exampels and thirdparty library require Go 1.24
33+
# HACK(mafredri): The examples and thirdparty library require Go 1.24
3434
# due to `golang.org/x/crypto` import, so lint tools must be built by
3535
# the highest version of Go used.
3636
go-version-file: ./internal/thirdparty/go.mod

internal/examples/http2/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Cleartext HTTP/2:
1414

1515
```console
1616
# Server.
17-
$ cd examples/http2
17+
$ cd internal/examples/http2
1818
$ GODEBUG=http2xconnect=1 go run . server -addr :8080
1919
listening on ws://127.0.0.1:8080 (h2c)
2020

@@ -27,7 +27,7 @@ TLS (wss) with self-signed cert:
2727

2828
```console
2929
# Server.
30-
$ cd examples/http2
30+
$ cd internal/examples/http2
3131
$ GODEBUG=http2xconnect=1 go run . server -tls -addr :8443
3232
listening on wss://127.0.0.1:8443 (self-signed)
3333

@@ -40,7 +40,7 @@ TLS (wss) with your own cert/key:
4040

4141
```console
4242
# Server.
43-
$ cd examples/http2
43+
$ cd internal/examples/http2
4444
$ GODEBUG=http2xconnect=1 go run . server -tls -cert cert.pem -key key.pem -addr :8443
4545
listening on wss://127.0.0.1:8443 (cert/key)
4646

internal/examples/http2/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ Examples:
125125
}
126126

127127
func visibleAddr(addr string) string {
128-
// If binding to all interfaces with ":port", display "127.0.0.1:port".
128+
// If binding to all interfaces with ":port", display "0.0.0.0:port".
129129
if strings.HasPrefix(addr, ":") {
130-
return "127.0.0.1" + addr
130+
return "0.0.0.0" + addr
131131
}
132132
return addr
133133
}

0 commit comments

Comments
 (0)