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

unable to import this module from a go project #1

Open
ypjin opened this issue Mar 23, 2022 · 3 comments
Open

unable to import this module from a go project #1

ypjin opened this issue Mar 23, 2022 · 3 comments

Comments

@ypjin
Copy link

ypjin commented Mar 23, 2022

With this imports

import (
    "k8s.io/client-go/rest"
	"kubesphere.io/client-go/client"
	"kubesphere.io/client-go/client/generic"
)

I got the following errors.

go mod tidy 
go: finding module for package kubesphere.io/client-go/client
go: finding module for package kubesphere.io/client-go/client/generic
github.com/ypjin/tokengen imports
	kubesphere.io/client-go/client: module kubesphere.io/client-go@latest found (v7.0.0+incompatible), but does not contain package kubesphere.io/client-go/client
github.com/ypjin/tokengen imports
	kubesphere.io/client-go/client/generic: module kubesphere.io/client-go@latest found (v7.0.0+incompatible), but does not contain package kubesphere.io/client-go/client/generic

It seems that it got k8s.io/client-go instead of kubesphere.io/client-go. The path kubesphere.io/client-go does not seem to point to the correct repo.

curl https://kubesphere.io/client-go\?go-get\=1
<html>
<head><title>404 Not Found</title><script src="/cdn-cgi/apps/head/W1bwo37SNmSgoHcvYbC3PuOubKo.js"></script></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.21.3</center>
</body>
</html>

Whereas the path k8s.io/client-go works well.

curl https://k8s.io/client-go\?go-get\=1 

            <html><head>
                  <meta name="go-import"
                        content="k8s.io/client-go
                                 git https://github.com/kubernetes/client-go">
                  <meta name="go-source"
                        content="k8s.io/client-go
                                 https://github.com/kubernetes/client-go
                                 https://github.com/kubernetes/client-go/tree/master{/dir}
                                 https://github.com/kubernetes/client-go/blob/master{/dir}/{file}#L{line}">
            </head></html>

Am I missing anything?

Best regards,

@zhouqunjie-cs
Copy link

is there any update for this issue?

@ylck
Copy link

ylck commented Oct 14, 2022

With this imports

import (
    "k8s.io/client-go/rest"
	"kubesphere.io/client-go/client"
	"kubesphere.io/client-go/client/generic"
)

I got the following errors.

go mod tidy 
go: finding module for package kubesphere.io/client-go/client
go: finding module for package kubesphere.io/client-go/client/generic
github.com/ypjin/tokengen imports
	kubesphere.io/client-go/client: module kubesphere.io/client-go@latest found (v7.0.0+incompatible), but does not contain package kubesphere.io/client-go/client
github.com/ypjin/tokengen imports
	kubesphere.io/client-go/client/generic: module kubesphere.io/client-go@latest found (v7.0.0+incompatible), but does not contain package kubesphere.io/client-go/client/generic

It seems that it got k8s.io/client-go instead of kubesphere.io/client-go. The path kubesphere.io/client-go does not seem to point to the correct repo.

curl https://kubesphere.io/client-go\?go-get\=1
<html>
<head><title>404 Not Found</title><script src="/cdn-cgi/apps/head/W1bwo37SNmSgoHcvYbC3PuOubKo.js"></script></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.21.3</center>
</body>
</html>

Whereas the path k8s.io/client-go works well.

curl https://k8s.io/client-go\?go-get\=1 

            <html><head>
                  <meta name="go-import"
                        content="k8s.io/client-go
                                 git https://github.com/kubernetes/client-go">
                  <meta name="go-source"
                        content="k8s.io/client-go
                                 https://github.com/kubernetes/client-go
                                 https://github.com/kubernetes/client-go/tree/master{/dir}
                                 https://github.com/kubernetes/client-go/blob/master{/dir}/{file}#L{line}">
            </head></html>

Am I missing anything?

Best regards,

go.mod

require (
	k8s.io/client-go v0.18.6
	kubesphere.io/client-go v0.3.1
)

@zheng1
Copy link
Member

zheng1 commented Oct 14, 2022

/assign @pixiake

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

4 participants