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

Add support for generating enums #47

Closed
vektah opened this issue Mar 15, 2018 · 0 comments
Closed

Add support for generating enums #47

vektah opened this issue Mar 15, 2018 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@vektah
Copy link
Collaborator

vektah commented Mar 15, 2018

Generating a model for enums would be great, it probably only needs to be a set of string constants:

type State string

const (
	StateOk = "OK"
        StateFailed = "FAILED"
        StateUnknown = "UNKNOWN"
)

maybe a few utility methods too:

  • Valid?
  • Scan?
  • (Un)?MarshalJson
  • Is(Ok,Failed,Unknown)?
@vektah vektah added enhancement New feature or request good first issue Good for newcomers labels Mar 15, 2018
@vektah vektah mentioned this issue Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant