I have the following code:
type ActorState int
const (
Unverified ActorState = 1 + iota
Verified
Banned
)
And I want to do this in my implementation.
i := 1
a : ActorState
a = ActorState(i)
But I get the error, Cannot convert expression of type int, error to type ActorState
.
How do I convert it then?