Constant Time
To introduce the power of Go’s constants let’s try a little challenge: declare a constant whose value is the number of bits in the natural machine word. When you combine the lack of immutability, the lack of fungibility, the lack of equality, you have a set of weird behaviours stemming from the fact that sentinel error values in Go are not constant expressions. This change is probably a bit of a stretch for the Go 1 contract, but there is no reason you cannot adopt a constant error pattern for your sentinel errors in the packages that you write.
Source: dave.cheney.net