From ff3aefbad4bed0cdd25688329e5cc4f908276a46 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Fri, 12 May 2023 11:33:20 -0400 Subject: [PATCH] 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 --- src/log/slog/record.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/log/slog/record.go b/src/log/slog/record.go index 77dcc477fda..972552d5194 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.