Create GOPATH folder
Create a folder in your project directory.This folder is going to be your GOPATH folder.
I creeated a folder named go for my specific GOPATH inside my project.
cd go mkdir src
Create project folder
cd src mkdir msync # project folder
Setup Jetbrains Gogland IDE
set the IDE to use your specific GOPATH not the global GOPATH
every time you want to get an external package open a terminal ( I have tested in Linux) :
go env # for checking env
go get github.com/eclipse/paho.mqtt.golang