1
0
mirror of https://github.com/golang/go synced 2024-11-23 02:00:03 -07:00

log/slog: fix link to Record.Clone in documentation

This commit is contained in:
Christopher Taylor 2023-06-22 09:22:34 +02:00 committed by GitHub
parent 78c3aba470
commit fdd4338118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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].