August 2019
Beginner to intermediate
798 pages
17h 2m
English
There are times when you need to store all your dependencies in the same place and keep them close to the files of your project. In these situations, the go mod vendor command can help you to do exactly this:
$ cd useTwoVersions $ go mod init useV1V2 go: creating new go.mod: module useV1V2 $ go mod vendor $ ls -l total 24 -rw------- 1 mtsouk staff 114B Mar 2 22:43 go.mod -rw------- 1 mtsouk staff 356B Mar 2 22:43 go.sum -rw-r--r--@ 1 mtsouk staff 143B Mar 2 19:36 useTwo.go drwxr-xr-x 4 mtsouk staff 128B Mar 2 22:43 vendor $ ls -l vendor/github.com/mactsouk/myModule total 24 -rw-r--r-- 1 mtsouk staff 28B Mar 2 22:43 README.md -rw-r--r-- 1 mtsouk staff 45B Mar 2 22:43 go.mod -rw-r--r-- 1 mtsouk staff 86B Mar 2 22:43 ...
Read now
Unlock full access