I am experimenting a web crawler COLLY – And it is fantastic !!
Have a look ! Golang
I am experimenting a web crawler COLLY – And it is fantastic !!
Have a look ! Golang
$ brew update
It takes a while to pull all the latest ... be patient ...
$ brew install golang
$ vi .bashrc
Then add those lines to export the required variables
This is actually your .bashrc file
export GOPATH=$HOME/go-workspace # don't forget to change your path correctly!
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
Create the workspace directories tree:
$ mkdir -p $GOPATH $GOPATH/src $GOPATH/pkg $GOPATH/bin
$GOPATH/src : Where your Go projects / programs are located
$GOPATH/pkg : contains every package objects
$GOPATH/bin : The compiled binaries home
source ~/.bashsrc
Go has a tool that automatically formats Go source code.
$ gofmt -w yourcode.go
OR
$ go fmt path/to/your/package
When installed, try to run go version
to see the installed version of Go.
davidr$ go version
go version go1.13.4 darwin/amd64