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

你好,请问go1.17运行代码,怎么解决go mod或GOPATH出现的找不到包的问题 #6

Open
Terrygmx opened this issue Nov 4, 2021 · 0 comments

Comments

@Terrygmx
Copy link

Terrygmx commented Nov 4, 2021

我试着run或build第一章的main.go,如果使用了go mod就会出现以下错误:

main.go:4:2: local import "./cache" in non-local package
main.go:5:2: local import "./http" in non-local package

删除go mod,会出现:
to create a module there, run:
cd ../.. && go mod init

这里我使用了 go mod init 或 export GOPATH=pwd 等都不能正常编译成功。请教在1.17版本如何运行代码

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

1 participant