Go supports constants of character, string, boolean, and numeric values. And you can not change value of constant.
const
declares a constant value
A const
statement can appear anywhere a var
statement can.
With left sample code, it will make error at n = 1, because you can change value of n
Now, please remove line
n = 1
and it run
package main
import "fmt"
const s string = "constant"
func main() {
fmt.Println(s)
const n = 500000000
fmt.Println("constant n = ", n)
n = 1
}

package main
import "fmt"
const s string = "constant"
func main() {
fmt.Println(s)
const n = 500000000
fmt.Println("constant n = ", n)
//n = 1
}

View on github