Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 715 Bytes

README.md

File metadata and controls

37 lines (26 loc) · 715 Bytes

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"
)