Skip to content

Get and install the latest (or any user-specified) version of Go on macOS (Intel or Apple Silicon)

License

Notifications You must be signed in to change notification settings

ianfoo/golang-get

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

golang-get

golang-get is a little script that will fetch the most recent version of Go for macOS from the official download site and install it. This may be useful if you do not use Homebrew to manage your Go installation. The script will detect your Mac's architecture and download the correct package for it.

Installing

Either clone this repository and copy or move golang-get to a directory in your $PATH, or change to a directory in your $PATH and run the following command:

curl -OLSs https://raw.githubusercontent.com/ianfoo/golang-get/main/golang-get && chmod 755 golang-get

Running

Simply run the following command:

golang-get

The script will ask for your password since /usr/sbin/installer must be run with sudo.

If you need a specific version of Go, you can pass it as a command line argument, like so:

golang-get 1.15.12

Dependencies

You will need HTTPie or curl installed for this script to work. This shouldn't be a problem since macOS includes curl in /usr/bin.

About

Get and install the latest (or any user-specified) version of Go on macOS (Intel or Apple Silicon)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages