Closed dogancanbakir closed 1 year ago
type VariableType uint8 const ( Type1 VariableType = iota Type2 ) allowedTypes := map[string]VariableType{"type1": Type1, "type2": Type2} flagSet.EnumSliceVar(&options.Type, "type", "", "Variable Type (type1/type2)", allowedTypes}),
go run . -type type1 # ok go run . -type type2 # ok go run . -type type1,type2 # ok go run . -type type3 # error
Proposal