How do I vendor a package which itself vendors another package?

279 Views Asked by At

I am trying to write an application that uses this package. I have the following snippet:

import (
    "github.com/ChimeraCoder/anaconda"
    "github.com/garyburd/go-oauth/oauth"
)

c, _, err := anaconda.GetCredentials(&oauth.Credentials{}, "...")

This results in the following compilation error:

app.go:40:9: cannot use "github.com/garyburd/go-oauth/oauth".Credentials literal
  (type *"github.com/garyburd/go-oauth/oauth".Credentials) as type
  *"github.com/ChimeraCoder/anaconda/vendor/github.com/garyburd/go-oauth/oauth".Credentials
  in argument to anaconda.GetCredentials

This is because github.com/ChimeraCoder/anaconda is using vendoring.

How then can I create an instance of *oauth.Credentials?

0

There are 0 best solutions below