mirror of
https://github.com/golang/go
synced 2024-11-23 06:10:05 -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:
parent
4481042c43
commit
ff3aefbad4
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user