Here's a simplified version of my file structure
├── honeyelb
| └── main.go
├── state
| └── state.go
└── vendor
└── ...
Both honeyelb/main.go
and state/main.go
are importing the same aws-sdk-go
dependency as follows:
import (
...
"github.com/aws/aws-sdk-go/aws/session"
)
Additionally, honeyelb/main.go
imports state/state.go
as a dependency as follows:
import (
...
"github.com/honeycombio/honeyaws/state"
)
When I use go get github.com/honeycombio/honeyaws/cmd/honeyelb
the tool installs fine, and there's no complaints about dependencies.
The problem is when I try to go build honeyelb/main.go
locally; I can see that honeyelb/main.go
and state/state.go
are pulling the aws/session
dependency from different locations:
cmd/honeyelb2/main.go:99:41: cannot use sess (type *"github.com/aws/aws-sdk-go/aws/session".Session) as type *"github.com/honeycombio/honeyaws/vendor/github.com/aws/aws-sdk-go/aws/session".Session in argument to state.NewDynamoDBStater
How do I get them to both build from the dependencies in vendor/
?