You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, I tried running a go file using go run <FILE>
Got the error message:
cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document
# k8s.io/client-go/applyconfigurations/meta/v1
/go/pkg/mod/k8s.io/[email protected]/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type*"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to proto.NewOpenAPIData
The text was updated successfully, but these errors were encountered:
Not sure if this will work for you, but I fixed it for myself by going to the client-go project and checking out the tag I was interested in. In your example, that would be v0.27.2. I then opened the go.mod file and found the k8s.io/kube-openapi version. https://github.com/kubernetes/client-go/blob/v0.27.2/go.mod#L30
I updated my go.mod to this version for k8s.io/kube-openapi.
Updated packages using
go get -u ./...
Then, I tried running a go file using
go run <FILE>
Got the error message:
cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document
The text was updated successfully, but these errors were encountered: