mediocregopher / goat

A simple, yaml-based go dependency manager
Apache License 2.0
68 stars 11 forks source link

Import Paths in Go 1.4 #29

Open trans opened 9 years ago

trans commented 9 years ago

Just learned about canonical import paths for Go 1.4. See here and here But I haven't gotten my head around it quite yet. I am wondering how this effects goat.

mediocregopher commented 9 years ago

I don't think they affect goat directly, just how you interact with projects in go overall. WHatever you would put in a go get command is what gets put in the .go.yaml. There might be a little weirdness with loc and path not matching (path will have to be the canonical url, and loc the actual physical url to pull from).

trans commented 8 years ago

Maybe instead of pulling the dependencies into .goat/deps/ they should be put in vendor/ now.

With Go 1.5 a new method to discover go packages was released. Nothing has been changed or added to the go language or the go compilers. Packages must still reside in GOPATH. However, if a package or a parent folder of a package contains folder named vendor it will be searched for dependencies using the vendor folder as an import path root. While vendor folders can be nested, in most cases it is not advised or needed. Any package in the vendor folder will be found before the standard library.