Looking how actively golang packages grow and improve I wonder how the problem with package versions is solved?
I see that one way is to store third-party packages under a project folder.
But what if I install it with go get?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
go getwill install the package in the first directory listed atGOPATH(an environment variable which might contain a colon separated list of directories). You can usego get -uto update existing packages.You can also use
go get -u allto update all packages in yourGOPATHFor larger projects, it might be reasonable to create different GOPATHs for each project, so that updating a library in project A wont cause issues in project B.
Type
go help gopathto find out more about theGOPATHenvironment variable.