What is the gopath and goroot?

GOROOT is the place where go is installed on your machine.

GOPATH is used to specify directories outside of the GOROOT that contain the source and binaries for a go project. You can have multiple paths in your go path, separated by ‘:’.

export GOPATH="$HOME/workspace:$HOME/projects"