You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has been proposed on two occasions by @nolash that package import URLs which don't end with the same name as the package they are importing should be explicitly aliased (see here and here).
So for example, import github.com/ipfs/go-cid should actually be import cid github.com/ipfs/go-cid even though the package is already called cid.
I am against this because I never manually edit imports (I just let goimports do it, which I assume most people do), and so doing so means I have to go and look at the imports all the time, even if the code compiles just fine.
That being said, I am happy to do this if most contributors find it useful.
In the spirit of consciencousness, I manually went into the packages on both occasions to find which package it actually was. It is a slight nuisance, and potentially confusing for those lesser experienced with golang.
A compromise could be to add a comment at the end of the line, revealing what the real package name is:
include (
"github.com/meta-network/xml" // metaxml
)
It has been proposed on two occasions by @nolash that package import URLs which don't end with the same name as the package they are importing should be explicitly aliased (see here and here).
So for example,
import github.com/ipfs/go-cid
should actually beimport cid github.com/ipfs/go-cid
even though the package is already calledcid
.I am against this because I never manually edit imports (I just let
goimports
do it, which I assume most people do), and so doing so means I have to go and look at the imports all the time, even if the code compiles just fine.That being said, I am happy to do this if most contributors find it useful.
/cc @nolash @orenyodfat @zelig
The text was updated successfully, but these errors were encountered: