Go: Hello world! example
Jump to navigation
Jump to search
↑ "fmt - The Go Programming Language". golang.org. Retrieved 2019-04-08.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
Hello world
touch hello_world.go
package main import "fmt" func main() { fmt.Println("Hello, world!") }
where "fmt" is the package for formatted I/O, similar to C's C file input/output.[1]
go build hello_world.go ./hello_world Hello, world!
See also
- Go, Gorutine:
go [ mod
|list
|fmt
,for
|build
|get
|version
|env | install | test
]go help
, Go template, Echo go web framework, Go packages, Blank identifier
Advertising: