Closed shuqingzai closed 5 months ago
G'day @shuqingzai, thanks for the suggestion.
Are you using golangci-lint? If you are, you can exclude certain linters reporting errors for specific files using exclude rules.
https://golangci-lint.run/usage/configuration/
e.g.
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
I'm not opposed to adding the functionality, as it would be backwards compatible, but given this can be achieved using golangci-lint, I would first ask if you're using that.
For example, the methods in a
bootstrap.go
are all used to start the program, and I just want to process them uniformly at the location where the service starts, instead of wrapping each functionCurrently, I need to handle something like the following, too many
nolint:wrapcheck
flags, not very friendly