Skip to content

Instantly share code, notes, and snippets.

@guybrush
Last active August 29, 2015 14:04
Show Gist options
  • 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/[email protected]
$GOPATH/pkg/[email protected]
$GOPATH/pkg/[email protected]   // import "[email protected]"
$GOPATH/pkg/[email protected]   // import "[email protected]"

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