From: Christopher Taylor Date: Thu, 22 Jun 2023 07:32:37 +0000 (+0000) Subject: log/slog: fix broken link to Record.Clone in package docs X-Git-Tag: go1.21rc3~2^2~68 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=82e17c4d11296b0444c94b3f7527e79f2e82a8d6;p=gostls13.git log/slog: fix broken link to Record.Clone in package docs Change-Id: If8b937fa9db89a537ad7d4ccb8c04f84d2cff3db GitHub-Last-Rev: fdd4338118e6e19a0a3673f364afcdb0b60236a4 GitHub-Pull-Request: golang/go#60938 Reviewed-on: https://go-review.googlesource.com/c/go/+/505075 TryBot-Bypass: Jonathan Amsterdam Reviewed-by: Dmitri Shuralyov Reviewed-by: Jonathan Amsterdam --- diff --git a/src/log/slog/doc.go b/src/log/slog/doc.go index 8237b4e3d5..97c1a0b5ef 100644 --- a/src/log/slog/doc.go +++ b/src/log/slog/doc.go @@ -255,7 +255,7 @@ and hidden fields that refer to state (such as attributes) indirectly. This means that modifying a simple copy of a Record (e.g. by calling [Record.Add] or [Record.AddAttrs] to add attributes) may have unexpected effects on the original. -Before modifying a Record, use [Clone] to +Before modifying a Record, use [Record.Clone] to create a copy that shares no state with the original, or create a new Record with [NewRecord] and build up its Attrs by traversing the old ones with [Record.Attrs].