From 484dc7dd07bdbd3edc7764fb3ca28b8badc04fd7 Mon Sep 17 00:00:00 2001 From: Rodin Date: Wed, 27 May 2026 05:52:38 +0000 Subject: [PATCH] fix: update drifted file:line citations in Go patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream golang/go has shifted several line numbers since citations were recorded. Updated 6 citations across 3 files: - documentation.md: server.go:55-57 → 59-62 (ErrWriteAfterFlush) - documentation.md: transport.go:79-80 → 72-73 (Transports should be reused) - structs.md: client.go:31-35 → 30-34 (A Client is an HTTP client) - structs.md: client.go:59-60 → 57-58 (type Client struct) - style.md: stream.go:280 → 292 (var _ Marshaler) - style.md: stream.go:280-281 → 292-293 (var _ Marshaler/Unmarshaler) Verified against golang/go HEAD (depth=1 clone). --- patterns/documentation.md | 4 ++-- patterns/structs.md | 4 ++-- patterns/style.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/patterns/documentation.md b/patterns/documentation.md index 72a06f8..29922ba 100644 --- a/patterns/documentation.md +++ b/patterns/documentation.md @@ -388,7 +388,7 @@ suggesting an alternative; using non-standard deprecation markers. **Code example from source:** ```go -// net/http/server.go:55-57 +// net/http/server.go:59-62 // Deprecated: ErrWriteAfterFlush is no longer returned by // anything in the net/http package. Callers should not // compare errors against this variable. @@ -445,7 +445,7 @@ concurrent use by multiple goroutines"). **Code examples from source:** ```go -// net/http/transport.go:79-80 +// net/http/transport.go:72-73 // Transports should be reused instead of created as needed. // Transports are safe for concurrent use by multiple goroutines. diff --git a/patterns/structs.md b/patterns/structs.md index 6ec9cc6..eb8f2f3 100644 --- a/patterns/structs.md +++ b/patterns/structs.md @@ -88,7 +88,7 @@ requiring all fields be set before the type is functional. **Code examples from source:** ```go -// net/http/client.go:31-35 +// net/http/client.go:30-34 // A Client is an HTTP client. Its zero value ([DefaultClient]) is a // usable client that uses [DefaultTransport]. type Client struct { @@ -474,7 +474,7 @@ type Signer interface { // Transports should be reused instead of created as needed. // Transports are safe for concurrent use by multiple goroutines. -// net/http/client.go:59-60 +// net/http/client.go:57-58 type Client struct { Transport RoundTripper // If nil, DefaultTransport is used. // ... diff --git a/patterns/style.md b/patterns/style.md index 7884440..80f2d3d 100644 --- a/patterns/style.md +++ b/patterns/style.md @@ -58,7 +58,7 @@ func ParseHTTPVersion(vers string) (major, minor int, ok bool) // net/http/server.go:3040 TLSConfig *tls.Config -// encoding/json/stream.go:280 +// encoding/json/stream.go:292 var _ Marshaler = (*RawMessage)(nil) ``` @@ -181,7 +181,7 @@ var _ fs.ReadFileFS = dirFS("") var _ fs.ReadDirFS = dirFS("") var _ fs.ReadLinkFS = dirFS("") -// encoding/json/stream.go:280-281 +// encoding/json/stream.go:292-293 var _ Marshaler = (*RawMessage)(nil) var _ Unmarshaler = (*RawMessage)(nil)