Golang is a static-typed language developed by Google. Let's learn this language to add more things into our arsenal. Golang can be useful for web service. Need to research further if it is also useful for scripting and data science.
- Install Go binary from Go offical website: Golang DLs
- Ensure Go is installed
- Linux:
/usr/local/go - Mac:
/usr/local/go
- Linux:
- something something about GOPATH (I didn't set $GOPATH env variable but it still works fine)
- create
hellodir, enter it:mkdir $HOME/Codes/go/src/hello cd $HOME/Codes/go/src/hello - and create simple hello world code
package main import "fmt" func main() { fmt.Printf("hello, world\n") } go buildin terminal- Assuming we are in
hellodir:./helloin terminal to run code. - DONE