GOLANG: Installation and hello world (Ubuntu)

1. Install latest go

$ sudo apt-add-repository ppa:ubuntu-lxc/lxd-stable
$ sudo apt-get update
$ sudo apt-get install golang

2. Create a Simple first.go file, with following

package main 
import "fmt" 
func main()  { 
    fmt.Printf("hello, world\n") 
}

3. Run

go run first.go

That’s all.

Any questions?
Please ask in comments

1 thought on “GOLANG: Installation and hello world (Ubuntu)”

Leave a Reply

Your email address will not be published. Required fields are marked *