Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set GOBIN automatically

working my go project i need to
set GOPATH=D:\projects\go\my project
and then
set GOBIN=D:\projects\go\my project\bin
that is okey

then working on an other project same process a gain
so is there is away of setting only GOPATH
and automatically GOBIN becomes GOPATH\bin

like image 959
Ahmed Ozmaan Avatar asked Oct 16 '16 07:10

Ahmed Ozmaan


1 Answers

GOBIN should by default be GOPATH/bin, so you don't have to do anything

See "GOPATH environment variable"

DIR is a directory listed in the GOPATH

If the GOBIN environment variable is set, commands are installed to the directory it names instead of DIR/bin

like image 179
VonC Avatar answered Sep 20 '22 15:09

VonC