We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am very angry, my project boase on go module. Now golang is 1.13.5 Why can't I import a local package
i just test simple , tree
cannot find module providing package com.dark.fish/util/Util
GO111MODULE="auto" Why?
The text was updated successfully, but these errors were encountered:
I think you should use the replace directive.
replace com.dark.fish/util/Util => ./com.dark.fish/util
https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive
Sorry, something went wrong.
@Darkells As @hnishi mentioned, you need to use replace directive.
$ mkdir foo $ cd foo $ cat > main.go package main import ( "com.dark.fish/util" ) func main() { util.DoSomething() } ^D $ cat > go.mod module foo replace com.dark.fish/util => ./com.dark.fish/util ^D $ pushd . $ mkdir -p com.dark.fish/util $ cd com.dark.fish.util $ cat > Util.go package util func DoSomething() { println("do something") } ^D $ go mod init com.dark.fish/util $ popd $ go build $ ./foo
This is issue tracker of Go. Please ask like this on golang-nuts or somewhere.
Like @mattn said, this is not the place to ask questions.
No branches or pull requests
I am very angry, my project boase on go module.
Now golang is 1.13.5
Why can't I import a local package
i just test simple ,
tree
cannot find module providing package com.dark.fish/util/Util
GO111MODULE="auto"
Why?
The text was updated successfully, but these errors were encountered: