Enable the gocritic linter in .golangci.yml and fix reported issues.
gocritic
.golangci.yml
Example: