Skip to content

Install

Edwin Vautier edited this page Apr 21, 2021 · 3 revisions

Install

To install the CLI, you first need to check that go is correctly installed on your machine.

Go variables

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

Projects

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

CLI install

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.

Clone this wiki locally