Skip to content

JamieEdge/getgo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getgo

Simple command line tool that will download the latest version of Go.

It may seem a little chicken and egg for a tool written in Go to be used to download Go. However due to the statically compiled nature of Go there is no dependency on the Go language package to run this tool.

The idea is for this tool to be used in automated build pipelines to download the latest version of Go. It therefore becomes simpler to automate compiling your Go project with the latest Go version without having static version numbers in your configuration.

The checksum is verified as part of the download process.

Build

On a host that already has Go installed:

go install github.com/jcmturner/getgo@latest

Run

To simply download the latest Go version, to the current working directory, corresponding to the OS and architecture getgo is run on:

./getgo

The OS, architecture and path to download to can be specified using arguments:

Usage of getgo:
  -arch string
    	Architecture type of release to download
  -info
    	Show latest Go version only, do not download
  -kind string
    	Kind of release to download (default "archive")
  -os string
    	OS type of release to download
  -path string
    	Path into which to write download (default "./")

If the GOOS and GOARCH environment variables are set these will be used if the -os and -arch are not provided.

To get the latest version information without downloading use the -info switch.

About

Command line tool to download the latest version of Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%