What is wrong with the following code?:
package main
func main() {
var x = 2
var y = 3
const someConst = x + y
}
Answer
Constants in Go can only be declared using constant expressions.
But x, y and their sum is variable.
const initializer x + y is not a constant