Skip to content

Commit

Permalink
all: fix some typos
Browse files Browse the repository at this point in the history
Change-Id: Id2b7fbb263d08103e17d2dc74454071fb3993586
Reviewed-on: https://go-review.googlesource.com/c/example/+/552396
Run-TryBot: shuang cui <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
TryBot-Bypass: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
  • Loading branch information
cuishuang authored and gopherbot committed Sep 6, 2024
1 parent 0349f37 commit 4e46ff5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/weave/weave.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// is output, where PACKAGE is constructed from the module path, the
// base name of the current directory, and the directory of FILENAME.
// This caption can be supressed by putting "-" as the final word of the %include line.
// This caption can be suppressed by putting "-" as the final word of the %include line.
package main

import (
Expand Down
8 changes: 4 additions & 4 deletions slog-handler-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This document is maintained by Jonathan Amsterdam `[email protected]`.

The standard library’s `log/slog` package has a two-part design.
A "frontend," implemented by the `Logger` type,
gathers stuctured log information like a message, level, and attributes,
gathers structured log information like a message, level, and attributes,
and passes them to a "backend," an implementation of the `Handler` interface.
The package comes with two built-in handlers that usually should be adequate.
But you may need to write your own handler, and that is not always straightforward.
Expand Down Expand Up @@ -89,7 +89,7 @@ A logger's `WithGroup` method calls its handler's `WithGroup` method.

We can now talk about the four `Handler` methods in detail.
Along the way, we will write a handler that formats logs using a format
reminsicent of YAML. It will display this log output call:
reminiscent of YAML. It will display this log output call:

logger.Info("hello", "key", 23)

Expand Down Expand Up @@ -138,7 +138,7 @@ func New(out io.Writer, opts *Options) *IndentHandler {
```

We'll support only one option, the ability to set a minimum level in order to
supress detailed log output.
suppress detailed log output.
Handlers should always declare this option to be a `slog.Leveler`.
The `slog.Leveler` interface is implemented by both `Level` and `LevelVar`.
A `Level` value is easy for the user to provide,
Expand Down Expand Up @@ -839,7 +839,7 @@ Beware of facile claims like "Unix writes are atomic"; the situation is a lot mo
Some handlers have legitimate reasons for keeping state.
For example, a handler might support a `SetLevel` method to change its configured level
dynamically.
Or it might output the time between sucessive calls to `Handle`,
Or it might output the time between successive calls to `Handle`,
which requires a mutable field holding the last output time.
Synchronize all accesses to such fields, both reads and writes.

Expand Down
8 changes: 4 additions & 4 deletions slog-handler-guide/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This document is maintained by Jonathan Amsterdam `[email protected]`.

The standard library’s `log/slog` package has a two-part design.
A "frontend," implemented by the `Logger` type,
gathers stuctured log information like a message, level, and attributes,
gathers structured log information like a message, level, and attributes,
and passes them to a "backend," an implementation of the `Handler` interface.
The package comes with two built-in handlers that usually should be adequate.
But you may need to write your own handler, and that is not always straightforward.
Expand Down Expand Up @@ -76,7 +76,7 @@ A logger's `WithGroup` method calls its handler's `WithGroup` method.

We can now talk about the four `Handler` methods in detail.
Along the way, we will write a handler that formats logs using a format
reminsicent of YAML. It will display this log output call:
reminiscent of YAML. It will display this log output call:

logger.Info("hello", "key", 23)

Expand All @@ -100,7 +100,7 @@ and the `New` function that constructs it from an `io.Writer` and options:
%include indenthandler1/indent_handler.go types -

We'll support only one option, the ability to set a minimum level in order to
supress detailed log output.
suppress detailed log output.
Handlers should always declare this option to be a `slog.Leveler`.
The `slog.Leveler` interface is implemented by both `Level` and `LevelVar`.
A `Level` value is easy for the user to provide,
Expand Down Expand Up @@ -557,7 +557,7 @@ Beware of facile claims like "Unix writes are atomic"; the situation is a lot mo
Some handlers have legitimate reasons for keeping state.
For example, a handler might support a `SetLevel` method to change its configured level
dynamically.
Or it might output the time between sucessive calls to `Handle`,
Or it might output the time between successive calls to `Handle`,
which requires a mutable field holding the last output time.
Synchronize all accesses to such fields, both reads and writes.

Expand Down

0 comments on commit 4e46ff5

Please sign in to comment.