8type AccountType string
9
10const (
11 KubernetesAccountType AccountType = "Kubernetes"12 AWSAccountType = "AWS"
13)
14
15type Authorization string
16
17const (
18 Read Authorization = "READ"19 Write = "WRITE"
20 Execute = "EXECUTE"
21)
Every constant in a constant declaration block needs to have a type unless
the iota
construct is used
const (
First byte = 1
Second = 2
)
the constant Second
does not have the same type as First
.
const (
First byte = 1
Second byte = 2
)
However, for iota
declarations, the following would work
const (
First byte = iota
Second
)