Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rene-d/goffline
Use Go modules offline
https://github.com/rene-d/goffline
Last synced: 25 days ago
JSON representation
Use Go modules offline
- Host: GitHub
- URL: https://github.com/rene-d/goffline
- Owner: rene-d
- License: unlicense
- Created: 2020-02-04T22:40:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T10:24:15.000Z (4 months ago)
- Last Synced: 2024-10-03T07:08:23.922Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 171 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Goffline
[![CI](https://github.com/rene-d/goffline/actions/workflows/go_test.yml/badge.svg)](https://github.com/rene-d/goffline/actions/workflows/go_test.yml)
How to use Go modules offline, without a GOPROXY like [Athens](https://github.com/gomods/athens) or a bunch of `git clone` and with keeping [checksums verification](https://sum.golang.org).
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:
```bash
./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 checksumMake a self-extracting archive of Go modules used by the [Go extension](https://marketplace.visualstudio.com/items?itemName=golang.go) for Visual Studio Code (only the compiled binaries, seems to be sufficient):
```bash
./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](https://github.com/golang/vscode-go/blob/master/src/goToolsInformation.ts), but without making the sophisticated checks of versions and needs.
Download current stable version of [Visual Studio Code](https://code.visualstudio.com), some extensions and the remote server (for [remote development](https://code.visualstudio.com/docs/remote/remote-overview)):
```bash
./vscode.sh [extension list]
```## Configuration
See [config.txt](./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`).