Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"go get" command not generating the bin folder when it is run in a shell script

I have installed go package. When I go to the instance(VM) and run the command go get github.com/linkedin/Burrow from a terminal/cmd it is downloading both "src" & "bin" folder under user home directory. But when I run the same command by setting GOPATH in a shell script, it is only downloading the "src" folder but not generating "bin" folder.

SOURCE_DIR="/opt/burrow"
export GOPATH=$SOURCE_DIR/go
go get $BURROW_REPO 

Am I missing anything?

like image 979
Balasekhar Nelli Avatar asked Feb 02 '26 22:02

Balasekhar Nelli


1 Answers

Use go install command (Compile and install packages and dependencies).

That command download src to $GOPATH and build it to $GOBIN.

like image 112
kozmo Avatar answered Feb 05 '26 13:02

kozmo