Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Variables cannot be redefined (no new variables on left side of :=)

package main

import (
	"fmt"
)

func main() {
	a := 42
	fmt.Println(a)

	a := 13
	fmt.Println(a)

}
# command-line-arguments
./redefine_variable_fail.go:11:4: no new variables on left side of :=