go get errors
accopeland opened this issue · 3 comments
Perhaps a local configuration problem, but following the 'install' section of the README for installing using go I get the following errors. Any suggestions?
go version
go version go1.15 darwin/amd64
go get github.com/octoproject/octo-cli
github.com/octoproject/octo-cli/knative
golang/src/github.com/octoproject/octo-cli/knative/knative.go:50:29: cannot use service (type *"knative.dev/serving/pkg/apis/serving/v1".Service) as type *"knative.dev/client/vendor/knative.dev/serving/pkg/apis/serving/v1".Service in argument to client.CreateService
golang/src/github.com/octoproject/octo-cli/knative/knative.go:89:3: cannot use "k8s.io/apimachinery/pkg/apis/meta/v1".ObjectMeta literal (type "k8s.io/apimachinery/pkg/apis/meta/v1".ObjectMeta) as type "knative.dev/serving/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ObjectMeta in field value
golang/src/github.com/octoproject/octo-cli/knative/knative.go:95:40: cannot use []"k8s.io/api/core/v1".Container literal (type []"k8s.io/api/core/v1".Container) as type []"knative.dev/serving/vendor/k8s.io/api/core/v1".Container in assignment
golang/src/github.com/octoproject/octo-cli/knative/knative.go:147:29: cannot use service (type *"knative.dev/serving/pkg/apis/serving/v1".Service) as type *"knative.dev/client/vendor/knative.dev/serving/pkg/apis/serving/v1".Service in argument to client.UpdateService
@accopeland
The issue is that module is out of date, to fix it:
$ cd golang/src/github.com/octoproject/octo-cli
$ go get -u -v
You should then see some updates and then things should work.
Also, you can download the binary here or through Homebrew by running:
$ brew tap octoproject/octoproject
$ brew install octo-cli
Thanks for the quick response. Installed successfully.
You are welcome :)