I'd like to create an enumeration (constants) with mutliple constant types for the values.
package startup
type args string
type argsOptional string
const (
HELP args = "help" argsOptional = "h"
ABOUT args = "about"
)
How'd I do it? I cannot use any array as constant, so I am confused how it would be best to do it.
Defining an const array like it's mentioned in the duplicate answer is not working and still not what I want!:
type args = [...]string
const (
HELP args = [2]string {"help","h"}
)
Does not compile!