To add to the previous answer, > I've read that GOPATH is the location of my workspace, where all of my go code belongs (personal project and dependencies of all of these projects).
yes (so far) > If I want to push one of my project on github, will I push only my project source code or will I also push the dependencies ? you might do both, depending on the project. If you decide to push your deps, they have to be located under vendor folder of the repo. If you prefer not to push the deps, you might want to try dep https://github.com/golang/dep/ or glide (glide.sh) > Can I have two projects using two different version of the same project ? Yes, if the dependency exists within the vendor folder of each project. On that subject, remember - go resolves dependencies by their longest path (might be more complex in some cases, not sure), - go resolves deps firstly in vendor, then into the WSpace (using above strat) Welcome ! On Monday, March 27, 2017 at 7:15:51 AM UTC+2, Rafo Ufoun wrote: > > Hello everyone ! > > I'm new to golang and I have some questions about the workspace and the > dependencies management. > > I've read that GOPATH is the location of my workspace, where all of my go > code belongs (personal project and dependencies of all of these projects). > > If I want to push one of my project on github, will I push only my project > source code or will I also push the dependencies ? > If I must push only my code, how another developer who wants to clone my > repo can find the list of my dependencies and use the rights versions ? > > Can I have two projects using two different version of the same project ? > (It seems to be impossible if all of my project and dependencies are in the > same folder). > > Thanks for you answers ! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.