I try to build a library.
But, how to release it as binary library instead of source code?
GOPATH=/home/USER/go
I put source on /home/USER/prj/mylib/mylib.go (I don't want put all project stuff in $GOPATH, because there contains other languages)
And make a symbolic link for it.
mkdir -p /home/USER/go/src/mycompany
ln -s /home/USER/prj/mylib/ /home/USER/go/src/mycompany/mylib
I can do 'go test' under /home/USER/go/src/mycompany/mylib/
But, if I type 'go install' it response
go install: no install location for directory /home/USER/prj/mylib outside GOPATH
Any suggestion?
BTW, during google search, I found this URL, and the issue is accepted but not resolved for a year.
I suppose to harden released binary is important.