Golang Basic 1 - Install && Hello World
What is Golang
- Official website: https://golang.org/
- Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
How to install
Comments
Hello World
usr@host:go/ # cat hello.go
package main // if you want to run this program
import "fmt" // import some build in packages, fmt is a packag e for print something on the screen
func main(){ // the main function, the entry of the program
fmt.Println("Hello world.!") // call fmt.Println to print something on the screen
}
usr@host:go/ # go build hello.go # build the program
usr@host:go/ # ./hello # run it
Hello world.!
Related
Be First to Comment