hello.go package main import "fmt" func main() { message := greetMe("world") fmt.Println(message) } func greetMe(name string) string { return "Hello, " + name + "!" } $ go build Or try it out in the Go repl, or A Tour of Go. Variable declaration var msg string var msg = "Hello, world!" var msg string = "Hello, world!" var x, y int var x, y int = 1, 2 var x, msg = 1, "Hello, world!" msg = "Hello" D
![Go cheatsheet](https://cdn-ak-scissors.b.st-hatena.com/image/square/df80e9c60df1a88d20b9aae1426290369ac7c2bd/height=288;version=1;width=512/https%3A%2F%2Fassets.devhints.io%2Fpreviews%2Fgo.jpg)