1

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?

kostix
  • 51,517
  • 14
  • 93
  • 176
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
  • 6
    You can't have nested vendor directories. You need to use a vendoring tool to flatten these into your top-level vendor directory (or do it manually if you choose) – JimB Oct 09 '17 at 21:36
  • 1
    And open an issue with the library maintainer! Libraries should not vendor their dependencies for exactly this reason. – Adrian Oct 10 '17 at 15:17

0 Answers0