From: Jonathan Amsterdam Date: Fri, 12 May 2023 15:33:20 +0000 (-0400) Subject: log/slog: document that NewRecord should be used to create a record X-Git-Tag: go1.21rc1~520 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ff3aefbad4bed0cdd25688329e5cc4f908276a46;p=gostls13.git log/slog: document that NewRecord should be used to create a record Change-Id: I5ce32a94660bdf12c577fd7f41a7627469f6467b Reviewed-on: https://go-review.googlesource.com/c/go/+/494618 Run-TryBot: Jonathan Amsterdam TryBot-Result: Gopher Robot Reviewed-by: Alan Donovan --- diff --git a/src/log/slog/record.go b/src/log/slog/record.go index 77dcc477fd..972552d519 100644 --- a/src/log/slog/record.go +++ b/src/log/slog/record.go @@ -15,6 +15,7 @@ const nAttrsInline = 5 // A Record holds information about a log event. // Copies of a Record share state. // Do not modify a Record after handing out a copy to it. +// Call [NewRecord] to create a new Record. // Use [Record.Clone] to create a copy with no shared state. type Record struct { // The time at which the output method (Log, Info, etc.) was called.