Packages, variables and functions
Download
Sample code
package main
import "fmt"
func main() {
fmt.println("hello, world")
}Test your Installation
$ go build hello.go # build
$ ./hello # run
# hello, worldGo tour
Tour > Basics > Packages, variables and functions.
Packages
Exported names
Functions
Variables
Basic types
Zero value
Type conversions
Type inference
Constants
For more insights
Last updated