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
Hi,
Just to notify you when generate enum with --sql on func (x *Example) Scan(value interface{}) (err error) {
func (x *Example) Scan(value interface{}) (err error) {
I got this gosec error:
Autofix: [.....\enumsExample_enum.go:173] - G115 (CWE-190): integer overflow conversion uint -> int (Confidence: MEDIUM, Severity: HIGH) 172: } > 173: *x = Example(*v) 174: case *uint64: Autofix: [....\enumsExample_enum.go:149] - G115 (CWE-190): integer overflow conversion uint -> int (Confidence: MEDIUM, Severity: HIGH) 148: case uint: > 149: *x = Example(v) 150: case uint64:
enum file:
//go:generate go run github.com/abice/[email protected] --marshal --names --noprefix --sql --lower --values --mustparse --flag --nocamel --prefix=EXAMPLE_ package models // ENUM(SUCCESS, FAIL, TIMEOUT, SKIPPED) type Example int
gosec command:
go install github.com/securego/gosec/v2/cmd/gosec@latest gosec ./...
I didn't see any way to dont generate this case (uint -> int) . Or with a full custom template...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
Just to notify you when generate enum with --sql on
func (x *Example) Scan(value interface{}) (err error) {
I got this gosec error:
enum file:
gosec command:
I didn't see any way to dont generate this case (uint -> int) . Or with a full custom template...
The text was updated successfully, but these errors were encountered: