Download
go get github.com/dmarkham/enumer
Sync vendor
go mod vendor
Install
go install github.com/dmarkham/enumer
Mark .go
source files with
//go:generate go run github.com/dmarkham/enumer -type=YOURTYPE
Run
go generate
ref: dmarkham/enumer