Skip to content

๐Ÿ“œ A simple shell script to install the Go ๐Ÿ’™ programming language!

License

Notifications You must be signed in to change notification settings

ikuamike/go-installer

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

81 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Go Installer ๐Ÿน

This code has been edited to suit my needs, please use the original repo

How to use it ๐Ÿค”

Installing(or updating) Go โฌ‡๏ธ

curl -s https://raw.githubusercontent.com/ikuamike/go-installer/master/go.sh | bash

Now, You can go grab a cup of coffee โ˜•, set back ๐Ÿ˜Œ and watch the magic happen! ๐Ÿ”ฎ

Please Note that

By default the script will create .go and go folders on your HOME directory, add the needed variables to your PATH variable.

$HOME/.go is location where Go will be installed to.
$HOME/go is the default workspace.

In order to install Go to other location or set custom workspace. You can set environment variables GOROOT or GOPATH before installing (or uninstalling) Go.

For example:

export GOROOT=/opt/go            # where Go is installed
export GOPATH=$HOME/projects/go  # your workspace

Read more about workspaces in Go.

Uninstalling Go โŒ

bash go.sh remove

How it works ๐Ÿ”ฅ

The script does the following steps:

  • checks if you have already installed Go!
  • automatically checks the installed operating system (Linux or Mac)
  • detects system architecture (armv6, armv8, amd64, i386)
  • parses the golang download page to find the latest version of Go that is available for your platform and architecture
  • in case of having already installed Go, if the latest and the current version are equal, the script exits ๐Ÿ‘‹
  • downloads the latest version
  • creates needed folders for workspace and Go binaries
  • extracts the files of the downloaded package
  • adds the binaries to PATH environmental variable

WORKS LIKE A CHARM ๐Ÿš€

License

MIT License

About

๐Ÿ“œ A simple shell script to install the Go ๐Ÿ’™ programming language!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%