]> Cypherpunks.ru repositories - gostls13.git/commitdiff
slog: fix grammatical mistakes in docs
authornilsocket <nilsocket@gmail.com>
Sun, 16 Apr 2023 09:21:22 +0000 (14:51 +0530)
committerGopher Robot <gobot@golang.org>
Thu, 4 May 2023 16:22:29 +0000 (16:22 +0000)
Change-Id: I183dda71fcec04fc1e622c66f719bd745d8b4eea
Reviewed-on: https://go-review.googlesource.com/c/go/+/484975
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Rob Pike <r@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
src/log/slog/doc.go
src/log/slog/handler.go

index 3b37eec0d2b5731a913e7f135d0026d045f739ba..5ca14b735b9892186bd3cf841da398198c922ffd 100644 (file)
@@ -64,7 +64,7 @@ produces this output:
 
        {"time":"2022-11-08T15:28:26.000000000-05:00","level":"INFO","msg":"hello","count":3}
 
-Both [TextHandler] and [JSONHandler] can be configured with [HandlerOptions].
+Both [TextHandler] and [JSONHandler] can be configured with [HandlerOptions].
 There are options for setting the minimum level (see Levels, below),
 displaying the source file and line of the log call, and
 modifying attributes before they are logged.
@@ -199,7 +199,7 @@ so even if it uses the common key "id", the log line will have distinct keys.
 
 Some handlers may wish to include information from the [context.Context] that is
 available at the call site. One example of such information
-is the identifier for the current span when tracing is is enabled.
+is the identifier for the current span when tracing is enabled.
 
 The [Logger.Log] and [Logger.LogAttrs] methods take a context as a first
 argument, as do their corresponding top-level functions.
index 2adaf56724c0cca056cc6c263d41d4e1d03bd48d..47c7fd27829037cf5baf1c3679a928ca8a9ac412 100644 (file)
@@ -40,7 +40,7 @@ type Handler interface {
        Enabled(context.Context, Level) bool
 
        // Handle handles the Record.
-       // It will only be called Enabled returns true.
+       // It will only be called when Enabled returns true.
        // The Context argument is as for Enabled.
        // It is present solely to provide Handlers access to the context's values.
        // Canceling the context should not affect record processing.
@@ -401,7 +401,6 @@ func (s *handleState) openGroup(name string) {
        if s.groups != nil {
                *s.groups = append(*s.groups, name)
        }
-
 }
 
 // closeGroup ends the group with the given name.