Suppose I have a go project that includes many packages. in the example we can see this
-Project
Now during encoding. If I need to use the aa package methods in my bb , then the reserved way is to import as
import "github.com/user/project/A/aa"
But I saw that this package import also supports relative imports, like
import "./../../A/aa"
It will also import this package and allow mw to use methods.
Now my question is: I have not seen any such imports. So is this type of relative import prohibited? or is it allowed, but using it is just bad coding practice?
source
share