Skip to content

Commit

Permalink
log/slog: make DiscardHandler example package-level
Browse files Browse the repository at this point in the history
Fixes #70782.

Change-Id: I8e8b763040bd10147eb7d1a30ac0774e28f90911
Reviewed-on: https://go-review.googlesource.com/c/go/+/635217
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
jba committed Dec 11, 2024
1 parent 5424f2e commit 3104b6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/log/slog/example_discard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
)

func ExampleDiscardHandler() {
func Example_discardHandler() {
// A slog.TextHandler can output log messages.
logger1 := slog.New(slog.NewTextHandler(
os.Stdout,
Expand Down

0 comments on commit 3104b6a

Please sign in to comment.