• Stars
    star
    522
  • Rank 84,811 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 8 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go plugin for the asdf version manager

asdf-golang

CI

golang plugin for asdf version manager

Requirements

MacOS

Linux (Debian)

Install

asdf plugin-add golang https://github.com/kennyp/asdf-golang.git

Use

Check the asdf readme for instructions on how to install & manage versions of go.

GOROOT

To set GOROOT in your shell's initialization add the following:

zsh shell
. ~/.asdf/plugins/golang/set-env.zsh

fish shell
. ~/.asdf/plugins/golang/set-env.fish

When using go get or go install

After using go get or go install to install a package you need to run asdf reshim golang to get any new shims.

Default go get packages

asdf-golang can automatically install a default set of packages with go get -u $PACKAGE right after installing a new Go version. To enable this feature, provide a $HOME/.default-golang-pkgs file that lists one package per line, for example:

// allows comments
github.com/Dreamacro/clash
github.com/jesseduffield/lazygit

You can specify a non-default location of this file by setting a ASDF_GOLANG_DEFAULT_PACKAGES_FILE variable.

Version selection

When using .tool-versions or .go-version, the exact version specified in the file will be selected.

When using go.mod, the highest compatible version that is currently installed will be selected. As per the Go modules reference, that is the highest minor version with a matching major version. For example, a go 1.14 directive in a go.mod file will result in the highest installed 1.minor.patch being selected, not necessarily 1.14.patch.

Note: Users can explicitly exclude or include go.mod and go.work by setting ASDF_GOLANG_MOD_VERSION_ENABLED. Currently it defaults to true, but that may change in the future, so it should be explicitly set.

Architecture Override

The ASDF_GOLANG_OVERWRITE_ARCH variable can be used to override the architecture that is used for determining which Go build to download. The primary use case is when attempting to install an older version of Go for use on an Apple M1 computer as Go was not being built for ARM at the time.

Without ASDF_GOLANG_OVERWRITE_ARCH

> asdf install golang 1.15.8
Platform 'darwin' supported!
URL: https://dl.google.com/go/go1.15.8.darwin-arm64.tar.gz returned status 404

With ASDF_GOLANG_OVERWRITE_ARCH

> ASDF_GOLANG_OVERWRITE_ARCH=amd64 asdf install golang 1.15.8
Platform 'darwin' supported!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  116M  100  116M    0     0  98.6M      0  0:00:01  0:00:01 --:--:-- 98.6M
verifying checksum
/Users/<home>/.asdf/downloads/golang/1.15.8/archive.tar.gz: OK
checksum verified

Skipping Checksums

By default we try to verify the checksum of each install but ocassionally that's not possible. If you need to skip the checksum for some reason just set ASDF_GOLANG_SKIP_CHECKSUM.

Contributing

Feel free to create an issue or pull request if you find a bug.

Issues

  • Assumes Linux, FreeBSD, or Mac
  • Assumes x86_64, i386, i686, armv6l, armv7l, arm64 and ppc64le

License

MIT License

More Repositories

1

asdf-python

Python plugin for the asdf version manager
Shell
664
star
2

asdf-direnv

direnv plugin for the asdf version manager
Shell
535
star
3

asdf-hashicorp

HashiCorp plugin for the asdf version manager
Shell
229
star
4

asdf-php

PHP plugin for the asdf version manager
Shell
214
star
5

asdf-deno

Deno plugin for the asdf version manager
Shell
121
star
6

asdf-kubectl

Kubectl plugin for the asdf version manager
Shell
120
star
7

asdf-flutter

flutter plugin for the asdf version manager
Shell
110
star
8

asdf-rust

Rust plugin for the asdf version manager
Shell
97
star
9

asdf-poetry

Poetry plugin for the asdf version manager
Shell
74
star
10

asdf-crystal

Crystal plugin for the asdf version manager
Shell
73
star
11

asdf-gleam

Gleam plugin for the asdf version manager
Shell
65
star
12

asdf-haskell

Haskell plugin for the asdf version manager
Shell
60
star
13

asdf-link

Use system tools with asdf version manager
Shell
51
star
14

asdf-zig

Zig plugin for the asdf version manager
Shell
43
star
15

asdf-kotlin

Kotlin plugin for the asdf version manager
Shell
40
star
16

asdf-plugin-manager

A plugin manager for the asdf version manager
Shell
38
star
17

asdf-alpine

Alpine Linux docker images of asdf tools
Shell
27
star
18

asdf-ocaml

OCaml plugin for the asdf version manager
Shell
27
star
19

asdf-elm

Elm plugin for the asdf version manager
Shell
25
star
20

asdf-ubuntu

Ubuntu docker images for asdf tools
Shell
23
star
21

asdf-nim

Nim plugin for the asdf version manager
Shell
22
star
22

asdf-scala

Scala plugin for the asdf version manager
Shell
22
star
23

asdf-graalvm

GraalVM plugin for the asdf version manager
Shell
19
star
24

infrastructure

Infrastructure configuration files
HCL
16
star
25

asdf-clojure

Clojure plugin for the asdf version manager
Shell
16
star
26

.github

asdf-community meta repository
15
star
27

asdf-haxe

Haxe plugin for the asdf version manager
Shell
14
star
28

asdf-opam

opam plugin for the asdf version manager
Shell
14
star
29

asdf-racket

Racket plugin for the asdf version manager
Shell
12
star
30

asdf-pdm

PDM plugin for the asdf version manager
Shell
8
star
31

asdf-sml

Standard ML plugin for the asdf version manager
Shell
7
star
32

asdf-ninja

Ninja plugin for the asdf version manager
Shell
7
star
33

asdf-aria2

aria2 plugin for the asdf version manager
Shell
7
star
34

asdf-lfe

LFE plugin for the asdf version manager
Shell
7
star
35

asdf-aocc

AMD Optimizing C/C++ Compiler plugin for the asdf version manager
Shell
6
star
36

asdf-dotty

dotty (Scala 3) plugin for the asdf version manager
Shell
6
star
37

asdf-chezscheme

Chez Scheme plugin for the asdf version manager
Shell
6
star
38

asdf-ccache

ccache plugin for the asdf version manager
Shell
6
star
39

asdf-mlton

MLton plugin for the asdf version manager
Shell
5
star
40

asdf-ktlint

ktlint plugin for the asdf version manager
Shell
5
star
41

asdf-peco

peco plugin for the asdf version manager
Shell
5
star
42

asdf-neko

Neko plugin for the asdf version manager
Shell
5
star
43

asdf-please

Please plugin for the asdf version manager
Shell
5
star
44

asdf-alp

alp plugin for the asdf version manager
Shell
5
star
45

asdf-meson

Meson plugin for the asdf version manager
Shell
5
star
46

asdf-mill

Mill plugin for the asdf version manager
Shell
5
star
47

asdf-idris2

Idris 2 plugin for the asdf version manager
Shell
5
star
48

asdf-lean

Lean plugin for the asdf version manager
Shell
4
star
49

asdf-esy

esy plugin for the asdf version manager
Shell
4
star
50

asdf-tuist

Tuist CLI plugin for the asdf version manager
Shell
4
star
51

asdf-odo

asdf version manager plugin for odo, the developer-focused CLI for fast and iterative application development on Podman, Kubernetes and OpenShift
Shell
4
star
52

asdf-idris

Idris plugin for the asdf version manager
Shell
3
star
53

asdf-quarkus

Quarkus plugin for the asdf version manager
Shell
3
star
54

asdf-rlwrap

rlwrap plugin for the asdf version manager
Shell
3
star
55

asdf-scala-cli

Scala CLI plugin for the asdf version manager
Shell
3
star
56

asdf-grpcurl

gRPCurl plugin for the asdf version manager
Shell
3
star
57

asdf-fstar

FStar plugin for the asdf version manager
Shell
3
star
58

asdf-cue

CUE plugin for the asdf version manager
Shell
2
star
59

asdf-uv

uv plugin for the asdf version manager
Shell
2
star
60

asdf-kiota

kiota plugin for the asdf version manager
Shell
2
star
61

asdf-cmctl

cmctl plugin for the asdf version manager
Shell
2
star
62

asdf-cmake

CMake plugin for the asdf version manager
Shell
2
star
63

asdf-getenvoy

GetEnvoy plugin for the asdf version manager
Shell
2
star
64

asdf-tridentctl

tridentctl plugin for the asdf version manager
Shell
1
star
65

asdf-moonrepo

Moon plugin for the asdf version manager
Shell
1
star
66

asdf-dprint

dprint plugin for the asdf version manager
Shell
1
star
67

asdf-dasel

Dasel plugin for asdf version manager
Shell
1
star
68

asdf-svu

SVU plugin for the asdf version manager
Shell
1
star
69

asdf-regal

regal plugin for the asdf version manager
Shell
1
star
70

asdf-mimirtool

mimirtool plugin for the asdf version manager
Shell
1
star
71

asdf-promtool

promtool plugin for the asdf version manager
Shell
1
star
72

asdf-duckdb

duckdb plugin for the asdf version manager
Shell
1
star