-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lint: add a linter to prohibit map[...]bool in favor of map[...]struct{}
The linter is currently limited to `sql/opt/norm` package. This commit was prompted by an article mentioned in the Golang Weekly newsletter. The rationale is that `map[...]struct{}` is more efficient, but in some cases the bool map value is actually desired, so this commit introduces an opt-out `//nolint:maptobool` comment. Release justification: low-risk performance improvement. Release note: None
- Loading branch information
1 parent
2e8c0f6
commit fd6be33
Showing
2 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters