Skip to content

Instantly share code, notes, and snippets.

@guybrush
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guybrush/271ce34c9cdcc1211766 to your computer and use it in GitHub Desktop.
Save guybrush/271ce34c9cdcc1211766 to your computer and use it in GitHub Desktop.
flat dependency tree

regarding the "diamond" dependency problem (see bionode/bionode#9 (comment)), you can use multiple versions of the same package in go (with a flat file-tree):

$GOPATH/pkg/X@0.1
$GOPATH/pkg/X@0.2
$GOPATH/pkg/Y@0.1   // import "X@0.1"
$GOPATH/pkg/Z@0.1   // import "X@0.2"

though go get will not enforce it, also the community arround go does not seem to embrace versioning.

but there is http://labix.org/gopkg.in . and i think best practise (see https://github.com/docker/docker/tree/master/vendor and https://github.com/bradfitz/camlistore/tree/master/third_party) is to maintain dependencies per package locally anyway.

so i (comming from nodejs and being a HUGE fan of npm) really like the freedom you get with golang regarding dependency-management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment