-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Right now, go-enum generates a massive switch statement when using string enums with the flag --sqlint. This is mostly because the switch checks for nil values and integer types other than int64. gocyclo reports a score of 25, which could be a problem for https://goreportcard.com that wants a minimum gocyclo score of 15.
However, the documentation for sql.Scanner states this:
// The src value will be of one of the following types:
//
// int64
// float64
// bool
// []byte
// string
// time.Time
// nil - for NULL values
Scan(src any) errorI'm a bit confused as to why go-enum has to check for other types such as int and uint64. Is it necessary?
Metadata
Metadata
Assignees
Labels
No labels