versioning

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package versioning provides protocol version management and changelog generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateChangelog

func GenerateChangelog(bumps []*VersionBump) string

GenerateChangelog generates a changelog from version bumps.

Types

type Change

type Change struct {
	Type        ChangeType `json:"type"`
	Field       string     `json:"field"`
	Description string     `json:"description"`
}

Change represents a single protocol change.

type ChangeType

type ChangeType int

ChangeType represents the type of protocol change.

const (
	FieldAdded   ChangeType = iota // minor
	FieldRemoved                   // major
	FieldChanged                   // major
	MetaChanged                    // patch
)

type VersionBump

type VersionBump struct {
	Current   string   `json:"current"`
	Suggested string   `json:"suggested"`
	BumpType  string   `json:"bump_type"` // "major", "minor", "patch"
	Changes   []Change `json:"changes"`
	Breaking  bool     `json:"breaking"`
}

VersionBump represents a semver bump recommendation.

func CompareSchemas

func CompareSchemas(old, new *schema.ProtocolSchema) *VersionBump

CompareSchemas compares two protocol schemas and returns changes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL