We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. In config document, user use json tag like this:
type Config struct { Name string // 没有任何 tag,表示配置必填 Port int64 `json:",default=8080"` // 如果配置中没有配置,将会初始成 8080 Path string `json:",optional"` }
but golangci-lint show error:
SA5008: unknown JSON option "default=8080" (staticcheck) SA5008: unknown JSON option "optional" (staticcheck)
Describe the solution you'd like Use your own tag, don't use json tag. for example:
type Config struct { Name string // 没有任何 tag,表示配置必填 Port int64 `zero:"default=8080"` // 如果配置中没有配置,将会初始成 8080 Path string `zero:"optional"` }
The text was updated successfully, but these errors were encountered:
This requirement is very personalized and is not supported. Have you tried the //nolint:all comment to ignore the lint of the modified structure?
//nolint:all
Sorry, something went wrong.
No branches or pull requests
Is your feature request related to a problem? Please describe.
In config document, user use json tag like this:
but golangci-lint show error:
Describe the solution you'd like
Use your own tag, don't use json tag.
for example:
The text was updated successfully, but these errors were encountered: