-
Notifications
You must be signed in to change notification settings - Fork 0
Install
Edwin Vautier edited this page Apr 21, 2021
·
3 revisions
To install the CLI, you first need to check that go is correctly installed on your machine.
On my machine, I have all my go setup inside my ~/.zshrc
:
cat ~/.zshrc
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOBIN
export PATH=$PATH:$GOROOT
export PATH=$PATH:$GOPATH/bin
Every go project I create is located inside my $HOME/go/src
folder, and I create a subfolder depending on the code remote adress.
For example, the go-gadgeto
project is hosted on my user profile on github, so the project is located inside :
$HOME/src/github.com/edwinvautier/go-gadgeto
By doing all this setup,go can easily find my packages and download them from github / gitlab... if needed
Once you ensured that everything was correctly set, you can simply run
go get github.com/edwinvautier/go-gadgeto
The CLI should now be downloaded on your machine and available in your $PATH, so you can run go-gadgeto
and it should work.