I am working on a project in Go that requires several external libraries, such as the MySQL driver, image management library, etc. I now have $GOPATHfor / usr / lib / go / src, which puts any downloaded packages in / usr / lib / go / src / src, which clearly doesn't seem right. If I installed $GOPATHin / usr / lib / go, I get an error message that $GOPATHcannot be installed in the same directory as $GOROOT. So I have to put GOPATH=/path/to/my/project/libbuild.sh in my file, and when I submit my git repository, put lib / in my .gitignore?
I understand that this is probably a stupid question. It works great, as it is now, I'm just wondering if this is bad.
source
share