Reputation: 491
I am on go version go1.11.2 linux/amd64. When the package godog is installed using go get github.com/DATA-DOG/godog/
, godog
executable is created inside $GOPATH/bin/. All fine till now.
I am creating an application myApp
that resides at $GOPATH/src/ in which under the folder vendor, godog package is added. When I try to create a binary out of vendor-ed package, an archive file is created inside $GOPATH/pkg/linux_amd64/myApp/vendor/github.com/DATA-DOG/
as godog.a
How can I create a binary in this scenario? I do not want to do go get
again just for the binary.
Upvotes: 4
Views: 2485
Reputation: 418435
go install
does not automatically install apps in vendor
folders, but you may specify a vendored path explicitly if you wish so. So simply run:
go install myApp/vendor/github.com/DATA-DOG/godog/cmd/godog
Upvotes: 3