On Fri, Sep 13, 2019 at 7:36 AM Robert Johnstone <r.w.johnst...@gmail.com> wrote: > > I'm looking at what I should do to keep my packages current with respect to > modules. The tutorials have covered top-level packages, but I haven't seen > any discussions around low-level packages. In particular, I have some > low-level packages that rely only on the standard library. It's not clear > whether or not these packages should have a go.mod file. At most, it would > specify the minimum version of go. I don't see much impact on usability or > maintenance either way. > > For vendoring, it was best practice (?) that only top-level packages would > vendor. I'm wondering if this rule applies to modules.
My understanding is that adding a go.mod file is a good idea even for low-level libraries, in that it gives you a way to set a version number for your library that your users will be able to use. You can then increment the version number as appropriate to indicate patches, minor updates, or even major version updates. See https://blog.golang.org/migrating-to-go-modules for more background on turning your library into a module. Of course, if you plan to never change your library again, or if the library has no users, then this doesn't matter. Ian -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWyy18HPyoMywqG-XXqy%2B2CW2CGMwDhHq-_y_CJnr1dEw%40mail.gmail.com.