But it does not work. It looks like it would, with the indentation and iota keyword, but its just some variables that do not constrain the type. There will be incoming rogue values, from json or sql or something else.
var g Gender // ok so far.
if err := json.Unmarshal("99", &g); err != nil { panic(err) }
// no error and g is Gender(99)!
Now you must validate, remember to validate, and do it in a thousand little steps in a thousand places.
Go is simple and gets you going fast... but later makes you stop and go back too much.