[go-nuts] Structs and enums

2016-12-07 Thread bartfokker
You could do something like this: type Base int const ( A Base = iota C T G ) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to go

[go-nuts] Structs and enums

2016-12-07 Thread Merzouki M'heni
Hello. I'm new to golang. I have to create a struct type which has fields that can be one of a range of specific values (the equivalent of enumerations in JAVA or other languages) This is the struct