-
Notifications
You must be signed in to change notification settings - Fork 13
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
Relative import paths are not resolved to full import paths. #5
Comments
This may not be a bug but rather intended behavior. The reason So, I'm not sure if this is a bug or intended behavior. Fixing it simply requires to do more work; it's not a bug in the existing code. The current documentation does not specify how relative import paths are handled: // ImportPaths returns the import paths to use for the given arguments.
// The path "all" is expanded to all packages in $GOPATH and $GOROOT.
// The path "std" is expanded to all packages in the Go standard library.
// The string "..." is treated as a wildcard within a path. @kisielk, is this a bug or intended behavior? I am leaning towards intended behavior... If so, is there room to expand the API to provide |
I've verified this is not a bug in code by running the I think this bug can be resolved by updating the documentation. I will make a PR. |
The code in gotool is pretty much copied verbatim from the go sources, so it should behave exactly the same. |
We should also document what happens when you give an empty slice of arguments. It returns |
For example, if you cd into $GOPATH/src/github.com/gorilla/mux and run:
You get the complete import path
github.com/kisielk/gotool
as output.However, with the same current-working directory, running:
Returns:
It should be
[]string{"github.com/kisielk/gotool"}
.The text was updated successfully, but these errors were encountered: