Skip to content

diiimo1973/go-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-installer

Install go in linux

Install actual go version, change 1.18 to actual version

sudo rm -Rf /usr/local/go
curl -o- https://raw.githubusercontent.com/diiimo2k20/go-installer/main/install.sh | sudo bash -s 1.18

Add environment variables.

GOROOT is optional, fix snap vscode bug

In ~/.profile (ubuntu, popos)

echo 'export GOROOT="/usr/local/go"' >> ~/.profile
echo 'export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin"' >> ~/.profile
source ~/.profile

In ~/.bash_profile (manjaro)

echo 'export GOROOT="/usr/local/go"' >> ~/.bash_profile 
echo 'export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin"' >> ~/.bash_profile
source ~/.bash_profile

In ~/.zprofile (zsh)

echo 'export GOROOT="/usr/local/go"' >> ~/.zprofile
echo 'export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin"' >> ~/.zprofile
source ~/.zprofile

Add private repos

go env -w GOPRIVATE="*.corp.example.com,rsc.io/private"

Install depends

go install github.com/golang/mock/mockgen@latest
go get -u github.com/go-task/task/v3/cmd/task
go get github.com/swaggo/swag/cmd/swag

Check

go version
go env

About

Installer for go in linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages