Skip to content
New issue

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

[Feature request] Add an option to generate a GoString method #98

Open
theclapp opened this issue Oct 11, 2024 · 0 comments
Open

[Feature request] Add an option to generate a GoString method #98

theclapp opened this issue Oct 11, 2024 · 0 comments

Comments

@theclapp
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant