enumer
enumer copied to clipboard
[Feature request] Add an option to generate a GoString method
kr/pretty wants a type to implement fmt.GoStringer, so I had to wrap enumer's String, e.g.
func (x MyType) GoString() string { return x.String() }
It'd be nice if enumer could generate that for me. Obviously for any given type it's not that big a deal, but so far I have three.
Other libraries might want some other interface, so maybe the option could specify the method name, e.g. -otherString=GoString
, which you could specify multiple times. Or it could accept a CSV.