Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Dowdell <mattdowdell@users.noreply.github.com>
  • Loading branch information
tigrato and mattdowdell authored May 9, 2024
1 parent ce49d49 commit 9447ccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ slog.Info("a user has logged in",

### Arguments with forbidden keys

To ensure users don't use reserved words in key-value pairs, you may want to enforce rules to avoid misusages.
To ensure users don't use reserved words in key-value pairs, you may want to enforce rules to avoid misuse.
The `forbidden-key` option causes `sloglint` to report usages of forbidden keys. These keys could be typically controlled by slog handlers and its usage should be preserved to avoid key duplication.

```go
slog.Info("a user has logged in", "reserved_key", 49) // sloglint: keys include forbidden values
slog.Info("a user has logged in", "forbidden_key", 49) // sloglint: "forbidden_key" key is forbidden and should not be used
```

[1]: https://golangci-lint.run
Expand Down

0 comments on commit 9447ccb

Please sign in to comment.