Open
Description
Hi! I have a use-case where I want to use enumer to map postgres enums with the -sql
flag. There may be conflicts in my enums, hence I cannot declare multiple enums in the same package.
Example:
//go:generate ...
type EnumA int
const (
Test EnumA = iota
Cool EnumA
)
//go:generate ...
type EnumB int
const (
VeryCool EnumB = iota
Cool EnumB // this will cause issues!
)
It would be neat if we could instead declare the values as strings, e.g.:
//go:generate ...
type EnumA string
const (
ATest EnumA = "TEST"
ACool EnumA = "COOL"
)
//go:generate ...
type EnumB string
const (
BVeryCool EnumB = "VERY_COOL"
BCool EnumB = "COOL"
)
Metadata
Assignees
Labels
No labels