Skip to content

Commit

Permalink
log/slog: document that NewRecord should be used to create a record
Browse files Browse the repository at this point in the history
Change-Id: I5ce32a94660bdf12c577fd7f41a7627469f6467b
Reviewed-on: https://go-review.googlesource.com/c/go/+/494618
Run-TryBot: Jonathan Amsterdam <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
  • Loading branch information
jba committed May 15, 2023
1 parent 4481042 commit ff3aefb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/log/slog/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ff3aefb

Please sign in to comment.