1
0
mirror of https://github.com/golang/go synced 2024-11-26 22:01:27 -07:00

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 <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Jonathan Amsterdam 2023-05-12 11:33:20 -04:00
parent 4481042c43
commit ff3aefbad4

View File

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