]> Cypherpunks.ru repositories - gostls13.git/commitdiff
log/slog: document that NewRecord should be used to create a record
authorJonathan Amsterdam <jba@google.com>
Fri, 12 May 2023 15:33:20 +0000 (11:33 -0400)
committerJonathan Amsterdam <jba@google.com>
Mon, 15 May 2023 19:12:45 +0000 (19:12 +0000)
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>
src/log/slog/record.go

index 77dcc477fda8e0c9c59102bad1a512a502844136..972552d5194e1778093566f9847b363e8a06fbcc 100644 (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.