Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSummary ¶
FormatSummary produces a human-readable summary of the changelog suitable for terminal output. Breaking changes appear first with a warning prefix.
Types ¶
type Category ¶
type Category int
Category classifies a change entry.
const ( // CategoryBreaking represents a breaking change requiring user action. CategoryBreaking Category = iota // CategoryFeature represents a new feature. CategoryFeature // CategoryFix represents a bug fix. CategoryFix // CategoryPerformance represents a performance improvement. CategoryPerformance // CategoryOther represents any other change (refactor, docs, chore, etc.). CategoryOther )
type Changelog ¶
type Changelog struct {
// FromVersion is the starting version (exclusive).
FromVersion string
// ToVersion is the ending version (inclusive).
ToVersion string
// Releases contains parsed releases ordered from oldest to newest.
Releases []Release
}
Changelog represents the parsed changelog across multiple releases.
func Parse ¶
Parse parses raw release notes markdown (as returned by SelfUpdater.GetReleaseNotes) into a structured Changelog.
func ParseFromArchive ¶
ParseFromArchive extracts and parses a CHANGELOG.md file from a gzipped tar release archive reader. Returns nil (not an error) if no changelog is found in the archive, allowing callers to fall back to API-based retrieval.
func (*Changelog) BreakingChanges ¶
BreakingChanges returns all breaking change entries across all releases.
func (*Changelog) EntriesByCategory ¶
EntriesByCategory returns all entries matching the given category across all releases.
func (*Changelog) HasBreakingChanges ¶
HasBreakingChanges returns true if any release contains breaking changes.
type Entry ¶
type Entry struct {
// Category is the type of change.
Category Category
// Scope is the conventional commit scope (e.g., "http", "chat"). May be empty.
Scope string
// Description is the change description text.
Description string
// Raw is the original unparsed line from the release notes.
Raw string
}
Entry represents a single change within a release.