goat icon indicating copy to clipboard operation
goat copied to clipboard

Import Paths in Go 1.4

Open trans opened this issue 11 years ago • 2 comments

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.

trans avatar Feb 14 '15 22:02 trans

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).

mediocregopher avatar Feb 15 '15 00:02 mediocregopher

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.

trans avatar May 03 '16 03:05 trans