This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added changes from jdx/mise#1638 (#36)
- Loading branch information
Showing
1 changed file
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,20 +18,71 @@ installed) and makes it the global default: | |
mise use -g [email protected] | ||
``` | ||
|
||
Minor go versions 1.20 and below require specifying `prefix` before the version number because the first version | ||
of each serie was released without a `.0` suffix, making 1.20 an exact version match: | ||
Minor go versions 1.20 and below require specifying `prefix` before the version number because the | ||
first version of each series was released without a `.0` suffix, making 1.20 an exact version match: | ||
|
||
```sh | ||
mise use -g go@prefix:1.20 | ||
``` | ||
|
||
## Configuration | ||
|
||
- `MISE_GO_SKIP_CHECKSUM` [bool]: skips checksum verification of downloaded go tarballs, defaults to false | ||
- `MISE_GO_DEFAULT_PACKAGES_FILE` [string]: location of default packages file, defaults to `$HOME/.default-go-packages` | ||
- `MISE_GO_DOWNLOAD_MIRROR` [string]: location to download go from, defaults to `https://dl.google.com/go` | ||
- `MISE_GO_SET_GOROOT` [bool]: set `$GOROOT` to the mise go installs go root dir, defaults to true | ||
- `MISE_GO_SET_GOPATH` [bool]: set `$GOPATH` to the mise go installs packages dir, defaults to true | ||
Set these with `mise settings set [VARIABLE] [VALUE]` or by setting the environment variable. | ||
|
||
### `go_default_packages_file` | ||
|
||
* Type: `string` | ||
* Env: `MISE_GO_DEFAULT_PACKAGES_FILE` | ||
* Default: `~/.default-go-packages` | ||
|
||
Packages list to install with `go install` after installing a Go version. | ||
|
||
### `go_download_mirror` | ||
|
||
* Type: `string` | ||
* Env: `MISE_GO_DOWNLOAD_MIRROR` | ||
* Default: `https://dl.google.com/go` | ||
|
||
URL to download go sdk tarballs from. | ||
|
||
### `go_repo` | ||
|
||
* Type: `string` | ||
* Env: `MISE_GO_REPO` | ||
* Default: `https://github.com/golang/go` | ||
|
||
Used to get latest go version from GitHub releases. | ||
|
||
### `go_set_gobin` | ||
|
||
* Type: `bool | null` | ||
* Env: `MISE_GO_SET_GOBIN` | ||
* Default: `null` | ||
|
||
Sets `GOBIN` to `~/.local/share/mise/go/installs/[VERSION]/bin`. This causes CLIs installed via | ||
`go install` to have shims created for it which will have env vars from mise such as GOROOT set. | ||
|
||
If not using shims or not using `go install` with tools that require GOROOT, it can probably be | ||
safely disabled. See the [go backend](https://mise.jdx.dev/dev-tools/backends/) for the preferred | ||
method to install Go CLIs. | ||
|
||
### `go_set_gopath` <Badge type="warning" text="deprecated" /> | ||
|
||
* Type: `bool` | ||
* Env: `MISE_GO_SET_GOPATH` | ||
* Default: `false` | ||
|
||
Sets `GOPATH` to `~/.local/share/mise/go/installs/[VERSION]/packages`. This retains behavior from | ||
asdf and older mise/rtx versions. There is no known reason for this to be enabled but it is available | ||
(for now) just in case anyone relies on it. | ||
|
||
### `go_skip_checksum` | ||
|
||
* Type: `bool` | ||
* Env: `MISE_GO_SKIP_CHECKSUM` | ||
* Default: `false` | ||
|
||
Skips checksum verification of downloaded go tarballs. | ||
|
||
## Default packages | ||
|
||
|