I had installed go-1.6 in Ubuntu 16.04 LTS. I also had set up two different workspaces and the $GOPATH by specifying the location of both the workspaces in it.
But one of the workspaces(primary or main workspace) is working correctly while the other one(secondary workspace) is not working. I wish to use the secondary workspace for practising web app development in golang and the primary one for my projects. Both these workspaces have different packages in them as I am using them for different purposes. While working with the secondary workspace, I am getting errors like 'package not found' when I import packages in my programs . The 'go build' tool is looking for those packages in the primary workspace but they are present in secondary workspace. I am using Atom editor by GitHub.
Even when I install packages using 'go get', the packages are installed in the primary workspace.
The 'go environment variables' are as follows :-
gkv@GKVInnovations:~$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gkv/Desktop/goWorkspace:/home/gkv/Desktop/Business/Backend"
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
Location of the primary workspace :- /home/gkv/Desktop/goWorkspace
Location of the secondary workspace :- /home/gkv/Desktop/Business/Backend
Please help me to resolve this issue and improve my workflow!