Skip to content

matthewswar/enuminator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enuminator

This is a tool that generates case insensitive enumerations. Only string enumerations are supported.

Usage

$ ./enuminator --help
Usage: enuminator <command>

Flags:
  -h, --help    Show context-sensitive help.

Commands:
  generate --name=STRING
    Generates enums for the specified type.

  version
    Prints the version of this tool.

Run "enuminator <command> --help" for more information on a command.

Go Generate

This tool is best suited for Go's generate functionality.

//go:generate enuminator --name Color
type Color string

const (
    ColorRed Color   = "red"
    ColorBlue Color  = "blue"
    ColorGreen Color = "green"
)

About

Golang Enumeration Generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages