Closed gold-kou closed 3 months ago
go get and go-get-tool in Makefile doesn't work in Go1.18+.
go get
go-get-tool
So make build failed like below. (My Go Version is 1.20.2)
make build
make build go: creating new go.mod: module tmp Downloading sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1 go: added github.com/fatih/color v1.7.0 go: added github.com/gobuffalo/flect v0.2.0 go: added github.com/gogo/protobuf v1.3.1 go: added github.com/google/gofuzz v1.1.0 go: added github.com/inconshreveable/mousetrap v1.0.0 go: added github.com/json-iterator/go v1.1.8 go: added github.com/mattn/go-colorable v0.1.2 go: added github.com/mattn/go-isatty v0.0.8 go: added github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd go: added github.com/modern-go/reflect2 v1.0.1 go: added github.com/spf13/cobra v1.0.0 go: added github.com/spf13/pflag v1.0.5 go: added golang.org/x/mod v0.2.0 go: added golang.org/x/net v0.0.0-20200226121028-0de0cce0169b go: added golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 go: added golang.org/x/text v0.3.2 go: added golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5 go: added golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 go: added gopkg.in/inf.v0 v0.9.1 go: added gopkg.in/yaml.v2 v2.2.8 go: added gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966 go: added k8s.io/api v0.18.2 go: added k8s.io/apiextensions-apiserver v0.18.2 go: added k8s.io/apimachinery v0.18.2 go: added k8s.io/klog v1.0.0 go: added k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 go: added sigs.k8s.io/controller-tools v0.4.1 go: added sigs.k8s.io/structured-merge-diff/v3 v3.0.0 go: added sigs.k8s.io/yaml v1.2.0 /Users/koki.hatano/github/gold-kou/gatling-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." bash: /Users/koki.hatano/github/gold-kou/gatling-operator/bin/controller-gen: No such file or directory make: *** [generate] Error 127
These may help. https://github.com/kubernetes-sigs/kubebuilder/pull/2486 https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v3.4.0
Summary
go get
andgo-get-tool
in Makefile doesn't work in Go1.18+.So
make build
failed like below. (My Go Version is 1.20.2)These may help. https://github.com/kubernetes-sigs/kubebuilder/pull/2486 https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v3.4.0