Hacker News new | past | comments | ask | show | jobs | submit login

This is a fundamental misunderstanding of how go dependencies work.

Dependencies are simply package names. It just happens that names are actually meaningful and tell you where you, the developer can get the package. Using vendoring and/or Godep/glide, you then strictly version and manage your dependencies. `go build` doesn't just run `git clone` or something.




So what is the approach when package X happens to change their Git path, change to another SCM server, or migrate the project to the next cool SCM tool?

On any sensible package management system, as a user of the said package, I won't need to change anything.


Vendoring is how you do dependency management with Go. Using vendoring you would also not need to change anything.


So you vendor version a04377dfebbf79f0ff43b5da2b21b835f1495803, then by the time you decide to upgrade to version a04377dfebbf79f0ff43b5da2b21b835f1495803, the project moved from Github to Gitlab.

How you upgrade with zero code changes?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: