fix: use `go install` instead of `go get`

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
pull/11119/head
Matthew Fisher 2 years ago
parent fd9f4ccbed
commit aa6e82bac8
No known key found for this signature in database
GPG Key ID: 887ED80487CE4E0F

@ -149,15 +149,15 @@ gen-test-golden: test-unit
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# dependencies # dependencies
# If go get is run from inside the project directory it will add the dependencies # If go install is run from inside the project directory it will add the
# to the go.mod file. To avoid that we change to a directory without a go.mod file # dependencies to the go.mod file. To avoid that we change to a directory
# when downloading the following dependencies # without a go.mod file when downloading the following dependencies
$(GOX): $(GOX):
(cd /; GO111MODULE=on go get -u github.com/mitchellh/gox) (cd /; GO111MODULE=on go install github.com/mitchellh/gox@latest)
$(GOIMPORTS): $(GOIMPORTS):
(cd /; GO111MODULE=on go get -u golang.org/x/tools/cmd/goimports) (cd /; GO111MODULE=on go install golang.org/x/tools/cmd/goimports@latest)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# release # release

@ -117,9 +117,9 @@ func TestFuncs(t *testing.T) {
// version of mergo (even accidentally) that causes a breaking change. See // version of mergo (even accidentally) that causes a breaking change. See
// sprig changelog and notes for more details. // sprig changelog and notes for more details.
// Note, Go modules assume semver is never broken. So, there is no way to tell // Note, Go modules assume semver is never broken. So, there is no way to tell
// the tooling to not update to a minor or patch version. `go get -u` could be // the tooling to not update to a minor or patch version. `go install` could
// used to accidentally update mergo. This test and message should catch the // be used to accidentally update mergo. This test and message should catch
// problem and explain why it's happening. // the problem and explain why it's happening.
func TestMerge(t *testing.T) { func TestMerge(t *testing.T) {
dict := map[string]interface{}{ dict := map[string]interface{}{
"src2": map[string]interface{}{ "src2": map[string]interface{}{

Loading…
Cancel
Save