Dep: Vendoring a library with shared dependencies

I am struggling a bit with a library I am extracting from one of my go projects and dep.

So far I had the library be part of my main application as a package living under github.com/org/repo/package.
I moved it to it’s own package under: github.com/org/repo and adjusted the import paths etc…

Nothing special so far, code should still compile, but for this error:

main.go: cannot use session (type *“xxx/vendor/github.com/gocql/gocql”.Session) as type *“github.com/gocql/gocql”.Session in argument to New

Both the main library and the new code depends on gocql, the idea is that when calling my libraries New() to pass a *gocql.Session but apparently to the compiler these are two different signatures (as the library does not vendor anything but the program does.

Any idea how to solve that? Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.