import "http://www.geocities.com/bla/packagebla"
i.e. I don't want to mention some 3rd party irrelevant company name, and especially its URL in my source code.
import "http://www.geocities.com/bla/packagebla"
i.e. I don't want to mention some 3rd party irrelevant company name, and especially its URL in my source code.
import "geocities.com/bla/packagebla"
which, IMO, is totally fine, Java has popularized putting some variant of the URL in the package name.For me, it means that all dependencies are declared by origin, meaning you don't need to track where they come from , the origin is the import.
mkdir $GOPATH/src/mystuff
git clone https://github.com/foo/bar
# may be switch to a branch here while you're at it
mv bar $GOPATH/src/mystuff/bar
Now in your Go program import "mystuff/bar"
The whole "URL import" is not a "feature of Go", it's an artifact of "go get", just a tool to make it easier to pull code from github or whatever.1) I know exactly where the package came from:
import "geocities.com/bla/packagebla"
vs
import "packagebla"
2) Easy to determine if the package is official, internal, or external (gofmt).
However, what is lacking is a unified vendoring standard. They will address this shortly.
Then don't use a irrelevant company name. Use your own name e.g. rsc.io/pdf . See more here https://golang.org/doc/go1.4#canonicalimports
More about this here https://golang.org/doc/go1.4#canonicalimports
And he/she also don't have do any extra work so that I can keep using the same package names.
As for being upset, not really, unless my boss requires me to use Go, I don't plan using it again.
And if you start maintaining a redirect on a site you control, what happens when you let the domain die because you never use it?
The amount of HN people who have a personal domain listed in their profile that is dead because life got in the way is surprisingly high (including me until recently).
Right. Either you trust that Github or whomever will always be there or you manage your own domain, or you vendorise and put your dependencies in tree. There are benefits and drawbacks to each approach. It's not magic and we're all adults.
There is no way to avoid doing code changes in order to update the code that was vendored, this assuming that it isn't a binary package to start with.
New uses of go get will not work, but it's not impossible to work this way. Alternatively, you use find . -name \*.go -exec sed -i 's:github.com/coolpeople/coolpackage:gitlab.com/coolpeople/coolpackage:' {} +`.
1. I know precisely where a package is coming from.
2. When vendored, I know precisely in which directory a package is stored.
3. I actually want to know if a random no-name library is introduced by developers, so I can google it. URL looking import is a nice feature in this case.
One of the most stupid engineering decisions I've seen in years, imo.
(Vendoring and package management are different issues)
https://github.com/coreos/etcd/blob/master/lease/leasehttp/h...
What could possibly justify having to use that import line in a sibling package of the same code?
https://www.kickstarter.com/projects/2066438441/haunts-the-m...
Now explain your side.
Java and Node, for example, don't solve anything - to get something that builds sensibly they both entirely depend on "external service" being always available and enforcing naming (see the leftpad fiasco). C/C++ are the source of the term "dependency hell".
$ go get whois etcd
github.com/coreos/etcd
But no. We need to put that in every freaking file and thus transit from information to noise.