Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed: unable to import package "github.com/Maistra/istio/pkg/servicemesh" #78

Closed
lbcdev opened this issue Feb 12, 2020 · 4 comments

Comments

@lbcdev
Copy link

lbcdev commented Feb 12, 2020

Hi team,

I am trying to import ServiceMeshMemberRoll type in a Go client, but failed.

Go version: go1.13.4 darwin/amd64
The code looks like:

import
maistrav1 "github.com/Maistra/istio/pkg/servicemesh/client/clientset/versioned/typed/servicemesh/v1"
...
type ServiceMeshMemberRollInterface struct {
V1 *maistrav1.ServiceMeshMemberRollInterface
}

In the go.mod, I added:
github.com/Maistra/istio v0.0.0-20181105172658-41d45b880a2f // indirect

Did I import the wrong library?

Thanks.
Longbin

@luksa
Copy link
Contributor

luksa commented Feb 13, 2020 via email

@lbcdev
Copy link
Author

lbcdev commented Feb 13, 2020

Hi Marko,

Thanks for the help. I tried this but istio.io/istio v1.4.0 didn't work in go.mod. The error is:
go: istio.io/[email protected]: reading istio.io/istio/go.mod at revision v1.4.0: unknown revision v1.4.0

My go version is 1.13.4. If I use go get istio.io/istio@master, it add a version below:
istio.io/istio v0.0.0-20200213023612-9fdbf4f32acb // indirect
Then cannot load module:
module istio.io/istio@latest found (v0.0.0-20200213023612-9fdbf4f32acb), but does not contain package istio.io/istio/pkg/servicemesh/client/clientset/versioned/typed/servicemesh/v1

Is it my go version or did I miss something else?

Thanks,
Longbin

@luksa
Copy link
Contributor

luksa commented Feb 13, 2020

Did you add the replace line to your go.mod?

@lbcdev
Copy link
Author

lbcdev commented Feb 13, 2020

Hi Marko,

I forgot to add the replace line and now it works.
Thank you so much for your time.

Best,
Longbin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants