Basics · Example 01
Hello World
fmtOur first program prints the classic "hello world" message. Every Go program starts in the function main of the package main.
package mainThe fmt package implements formatted input and output.
import "fmt"
func main() {
fmt.Println("hello world")
}$ go run ./01_hello_world hello world