Shared payload models for use across services and tooling.
go get github.com/Prypiatos/shared-models@v1.0.0import "github.com/Prypiatos/shared-models/models"Upgrade to a newer version:
go get github.com/Prypiatos/shared-models@v1.1.0
go mod tidyFor major version upgrades (v2 and above), the module path includes the version suffix.
go get github.com/Prypiatos/shared-models/v2@v2.0.0import "github.com/Prypiatos/shared-models/v2/models"- The
/v2suffix applies to all v2 versions (v2.0.0,v2.1.0, etc.) - Minor and patch updates within v2 do not change the import path
This module follows Semantic Versioning:
vMAJOR.MINOR.PATCH
- PATCH: bug fixes, no API changes
- MINOR: backward-compatible additions (e.g., new payloads, new fields)
- MAJOR: breaking changes (e.g., field removals, renames, type changes)
Within a given major version (e.g., all v1.x.x releases):
- Existing struct fields will not be removed or renamed
- Existing field types will not be changed
- New fields may be added, so consumers should not use full struct equality checks
- JSON field names (tags) will not change
A new major version (e.g., v2) may introduce:
- Field removals or renames
- Type changes
- Structural changes to payloads
These require:
- Updating the module path (
/v2) - Updating import paths in consuming code
- Make changes
- Commit
- Tag the version:
git tag v1.1.0
git push origin v1.1.0- Update
go.mod:
module github.com/Prypiatos/shared-models/v2- Commit and tag:
git tag v2.0.0
git push origin v2.0.0