Open Proximyst opened 4 months ago
You could add a prefix to your const
s and then strip it:
//go:generate go run github.com/dmarkham/enumer -type EnumA -trimprefix EnumA
type EnumA int
const (
EnumATest EnumA = iota
EnumACool
)
Would that work?
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:
It would be neat if we could instead declare the values as strings, e.g.: