Langsung ke konten utama

Postingan

Menampilkan postingan dari Juli, 2017

How to install Go Lang in Linux

1. Download the package in https://golang.org/dl/ for linux 2. Open your terminal and set the path in your package location 3. Extract the file with this command -> tar -C /usr/local -xzf name_of_package 4. Export path for go lang. Follow this command -> export PATH=$PATH:/usr/local/go/bin 5. Finish. Go lang already install in your computer. If you wanna test the installation work or not follow this step : 1. create new directory src/hello in /usr/local/go/bin $ mkdir hello 2. create file hello.go inside src/hello. the file content is like below : package main import "fmt" func main() { fmt.Printf("hello, world\n") } 3. and then set the path to src/hello and run this -> go build 4. for run the file, run this command -> ./hello 5. if you see "hello, world" message then your installation is succesfully. Thnks for reading. If you have a problem please feel free to email me in yasminghassani@gmail.com. And i hope i can help yo...