On Tue, Mar 21, 2017 at 10:34 PM, <[email protected]> wrote: > So I am new to Go and upon developing some things I am curious about best > practices for building/releasing libraries which will be used by other > programs in Go. > > Coming from a Java world, when you build a library, you build an actual > artifact, thus having a separate process for testing + building + releasing a > library makes sense. > > However in Go a library is just code living in a repository. The way I see it > a release of a library in go consists of something like tagging a vcs > repository or merging code to master branch or both. > > > Should I make a Makefile (or whatever people use) for a library for running > tests + build before doing a release even though I'm not actually creating a > build artifact out of anything?
You should ensure that whatever you tag as a release in the VCS is compiling and passing tests, but you shouldn't feel the need to use a Makefile for this. > Or should I run the library tests when building each application that uses it > (Which feels very strange and wrong)? Presumably applications that use library X will have their own test suite that validates library X is doing what it should by proxy. But you're right, you don't typically run the tests for your dependencies. > What are people doing out there? > > Any feedback on the matter would be welcome > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
