Writing a library and using pkg/errors

Hello all,

We are not supposed to use vendored dependencies when writing a library.
ok.
I wonder how I can still use github.com/pkg/errors in the library that I am developing.

I appreciate any advice/guideline on this.

Thanks,
Horst

I recommend that you do not vendor pkg/errors, but go get it, so it falls into your GOPATH. The consumer of your library, assuming they are an application (not a library) can vendor your library, and your libraries dependencies (pkg/errors) themselves.

Sadly there are no usable solutions for library authors today (dec, 2016), there may be in the future, but please check with your physician before holding your breath that long. Sorry about that.

1 Like

Thx, I can live with that.
I am not going to risk my health here.
:wink:

1 Like

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