Go
Go is a compiled, garbage collected programming language excellent at async, concurrent work
Install
Windows
- Download ZIP from https://go.dev/dl/ and save it to
Downloads
- Set version for scripts
powershell$version="1.23.2"
- Extract the downloaded archive
powershell7z x -y ~/Downloads/go$version.windows-amd64.zip "-o$HOME/dotbin/extra/portable"
- Setup
GOPATH
powershellmkdir -p ~/dotbin/extra/portable/go/gopath $gopath=$env:USERPROFILE+"\dotbin\extra\portable\go\gopath" [System.Environment]::SetEnvironmentVariable('GOPATH',$gopath,"User")
WARNING
Currently, GOPATH is not added to PATH because I don't need to run any Go packages. This might change in the future
- Configure link
powershellAdd-Content -Path ~/dotbin/extra/portable/link -Value "go/bin/go.exe`ngo/bin/gofmt.exe" sudo dotbin-link
- Download ZIP from https://go.dev/dl/ and save it to
Arch Linux: Install the
go
package and make the portable package directorybashsudo pacman -Syu go mkdir -p ~/dotbin/extra/portable/go
Then add the following to
~/.bashrc
bash# Go export GOPATH=$HOME/dotbin/extra/portable/go/gopath
WARNING
Restart Shell after making the changes to environment variables!
Then verify the installtion with
powershell
go version