I have a single group of constant:
const (
a = 100
b = 200
c = 300
)
I was wondering if there is any way to use iota
keyword instead of assigning each value manually?
As described in the official reference, it is possible to use bitwise shift with iota to increase numbers, but I want to increase by a fixed number like 100 for example.
const (
_ = iota * 100
a
b
c
)