This is a creation in Article, where the information may have evolved or changed. after the local compilation passed, you can consider uploading to the configuration library, which is basically git. Public network can be used Github,oschina. Because it is the test code, uploaded to the company's self-built Gogs (recommended) 1. Log in to Gogs, create a new warehouse, select the language go2 submit to Gogs. Execute git bash, cd $GOPATH/src/psnmp write Readme.md. Specifies the remote warehouse. Submit. Gogs There are operational tips
touch README.mdgit initgit add README.mdgit commit -m "first commit"git remote Add origin http :// 192.168 6.17 : 3000 /xxx / psnmp git git push -u origin master
3. Third-party libraries this is GOSNMP.
1) Submit to Gogs , if it was pulled down directly from GitHub without this step, but I am a zip download, so also need to submit to Gogos. method with 2 2) Download the latest version from GitHub CD $GOPATH/src git cloneHttps://github.com/soniah/gosnmp or go get github.com/soniah/gosnmp (Directory different) 4. Extract the third-party dependent package CD $GOPATH using GODEP/src/ PSNMPGODEP save can see that the Godeps directory was generated under PSNMP (the high version changed to Vendor), which contains the source snapshot of the third-party package (GOSNMP) used. and removed. Git means that the zip that goes down directly from GitHub is the same as 5.GODEP. each time we work with Go get or git clone to download third-party packages to the local $gopath src directory, the following issues exist:
Typically we develop multiple projects locally, and all projects work with third-party libraries in Gopath. Because there is no code to store third-party libraries in the project's version management, the other person will have to go back to get all dependent libraries when they download them. If we change a computer development, to re-download the dependent library using GODEP, you can project a third-party library. Ensure that the third-party library code is also included in the CMS to resolve dependencies