Déclarations Courtes

Déclarations courtes #

package main

import "fmt"

func main() {
    // `x := val` est la version courte pour
    // `var x type = val`.
    x := "Hello var"
    fmt.Println(x)
}
$ go run short-declarations.go
Hello var