Skip to content

Instantly share code, notes, and snippets.

View padamstx's full-sized avatar

Phil Adams padamstx

View GitHub Profile
@padamstx
padamstx / GoModVersioning.md
Last active December 9, 2019 13:57
Example of versioning a module-aware Go library used by both module-aware and non-module-aware applications

Versioning a module-aware library written in Go

Overview

This gist provides an example of how to version a library written in Go which uses Go modules for its dependency management. Included in this example are two applications - one that uses Go modules, and one that uses "dep" for dependency management.

Background

I recently migrated an existing Go-based library from using "dep" to using Go modules for its dependency management. At the time I did the migration, the library was at version 1.0.0, and I delivered the "module-aware" version as v1.0.1.