Getting an error: cannot use *company/model as type *vendor/company/model
Flat Vendor structure : vendor/company/model
The files import "company/model"
You have a package company/model
that is both vendored (under vendor/
) and in your global $GOPATH, you additionally have an unvendored package that your package depends on that depends on company/model
. So your package and the unvendored package are both trying to use the type company/modal but finding them in different places. The solution is to vendor the package that is not vendored.
delete the packages under the vendor directory