Skip to content

Commit 7e3fabe

Browse files
dunglasclaude
andcommitted
docs: address review feedback on bump-deps
- DefaultPorts godoc: spell out that mutating the exported map is only safe during package initialization / before concurrent use, since it is a plain Go map with no locking. - CI env comment: the go.mod here has no toolchain directive, so rephrase GOTOOLCHAIN=local's rationale in terms of Go's automatic toolchain download behavior in general. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3b1740a commit 7e3fabe

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
pull_request:
66

77
env:
8-
# Pin to the toolchain set up by actions/setup-go so Go does not silently
9-
# download a newer one based on the go.mod toolchain directive — that
10-
# would defeat the oldstable matrix entry.
8+
# Pin to the toolchain set up by actions/setup-go so Go does not
9+
# download or switch to a newer one automatically — that would defeat
10+
# the oldstable matrix entry.
1111
GOTOOLCHAIN: local
1212

1313
jobs:

parser.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ import (
1414
// https://urlpattern.spec.whatwg.org/#full-wildcard-regexp-value
1515
const fullWildcardRegexpValue = ".*"
1616

17-
// DefaultPorts maps a protocol scheme to its default port string. It is
18-
// exported so callers can register additional schemes, but this is an
19-
// experimental affordance and the symbol may change or be removed in a
20-
// future release.
17+
// DefaultPorts maps a protocol scheme to its default port string.
18+
//
19+
// Callers may add entries for additional schemes, but only during program
20+
// initialization and before any concurrent use of this package: as with
21+
// any Go map, concurrent read/write is not safe.
22+
//
23+
// This is an experimental affordance and the symbol may change or be
24+
// removed in a future release.
2125
//
2226
// TODO: there is nothing in the Go stdlib to find the default port
2327
// associated with a protocol. Only the specialSchemeSet entries are

0 commit comments

Comments
 (0)