Skip to content

rene-d/goffline

Repository files navigation

Goffline

CI

How to use Go modules offline, without a GOPROXY like Athens or a bunch of git clone and with keeping checksums verification.

Binaries for both architectures amd64 and arm64 are built during the download step, and the right one extracted during the installation step.

Requirements

Linux or macOS (Windows not tested) with Docker, bash and Internet access.

Usage

Make a self-extracting archive of Go modules:

./golang.sh [-f module_list] [options]

The result will be two files:

  • mods-[Go version]-[timestamp].sh : the self-extracting archive (with a few command-line options)
  • mods-[Go version]-[timestamp].sh.sha256 : optional archive checksum

Make a self-extracting archive of Go modules used by the Go extension for Visual Studio Code (only the compiled binaries, seems to be sufficient):

./golang.sh vscode

Nota: the program tries to dermine the needed tools, that is pretty difficult and hazardous. It tries to analyse the goToolsInformation.go, but without making the sophisticated checks of versions and needs.

Download current stable version of Visual Studio Code, some extensions and the remote server (for remote development):

./vscode.sh [extension list]

Configuration

See config.txt for an example of module and extension list.

Test

There is a unit test for Go downloads, run into a container with no Internet access (--network none).