* Add Makefile for Hygiene
Signed-off-by: Sora Morimoto <sora@morimoto.io>
* make format
Signed-off-by: Sora Morimoto <sora@morimoto.io>
---------
Signed-off-by: Sora Morimoto <sora@morimoto.io>
Co-authored-by: Kenny Parnell <k.parnell@gmail.com>
* Update installation url to match repo url
I also updated the command from `asdf plugin-add` to `asdf plugin add`
to match the official documentation.
Reference:
https://asdf-vm.com/manage/plugins.html
* Update plugin repository and CI status to asd-community for Go
* Emmit warning and change behavior based on ASDF_GOLANG_MOD_VERSION
* Add note on ASDF_GOLANG_MOD_VERSION to README.
* Rename to ASDF_GOLANG_MOD_VERSION_ENABLED.
* Add tests for legacy version parser
* Unsure how this ever worked before?
Fix a weird flub I can’t explain.
This can probably be fixup’ed into some other commit, but I’m using the web app, so, this is difficult
* Initialize shellspec and add to workflow.
* Automatic Yes to shellspec prompts.
* Install and Run ShellSpec as one job.
* Add find to debug action.
* Use shellspec in lib dir.
* Run ShellSpec on matrix
* Add shellspec to it's own workflow.
* Move shellspec.yml back into main.yml because checkout.
This file is not bash strict-mode compliant and because of that, if you execute it from a script in strict mode, it will through an error like follows:
WARN Failed to discover go env: failed to run 'go env': exit status 1
ERRO Running error: context loading failed: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: /Users/myuser/.asdf/plugins/golang/bin/exec-env: line 4: GOROOT: unbound variable
* Updated the default packages command to use "go install" for versions
greater than 1.16
* Cleaning up for linting, added condition to also check major version
* Update Version Parsing
Attempts to make shell check happy.
Co-authored-by: john.maguire <john.maguire@cbinsights.com>
Co-authored-by: Kenny Parnell <k.parnell@gmail.com>
* Add ASDF_GOLANG_OVERWRITE_ARCH override option
This change adds an ASDF_GOLANG_OVERWRITE_ARCH variable to allow overriding the architecture. This is useful if you need to install version of Go that were not released for macOS ARM. This is also done in the asdf terraform plugin: e1c7eea0f7/bin/install (L115-L129)
* Update README to include section about ASDF_GOLANG_OVERWRITE_ARCH
This small change prevents `asdf` from downloading the installation archive twice. This reverts a line change from #54.
Side note: according to https://asdf-vm.com/plugins/create.html, `bin/download` should do the downloading, not `bin/install`.
Source the default package list from the env var `$ASDF_GOLANG_DEFAULT_PACKAGES_FILE`, defaulting to `${HOME}/.default-golang-pks` if the former is not set.
The go directive in go.mod files is of the format `major.minor`. This
commit will allow the highest installed version of go with the same
major component to be selected. The previous behaviour was to use the
highest installed version with the same major _and_ minor components,
but I don't think this was strictly necessary. It is valid to use go
1.16 to build a project whose go.mod declares "go 1.14", for example.
For packages within the module, the compiler should reject use of
language features introduced after the version specified by the go
directive.
I think this adheres more closely to the expected behaviour of programs
that parse `go.mod`, and asdf users who need to pin a particular minor
or patch version of go can use `.tool-versions` or `.go-version`.
Source: https://golang.org/ref/mod#go-mod-file-go