Help us shape the future of Go! Take the 2026 Go Developer Survey

changelog

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package changelog reads a CHANGELOG.md in the Keep a Changelog layout that git-cliff produces from Conventional Commits, so the applications can show "what's new" from the same file the release page uses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Release

type Release struct {
	Version    string // "1.2.0" or "Unreleased"
	Date       time.Time
	Unreleased bool
	Sections   []Section
}

Release is one "##" block.

func Latest

func Latest(rs []Release, n int) []Release

Latest returns the n newest releases. Released versions come first; "Unreleased" work is shown only when nothing has been released.

func Parse

func Parse(text string) []Release

Parse reads the releases of a changelog, newest first as written. Anything before the first release heading is ignored.

func Since

func Since(rs []Release, version string) ([]Release, bool)

Since returns the releases written before version in the file, i.e. the newer ones, including unreleased work. ok is false when version is not in the changelog.

func (Release) Markdown

func (r Release) Markdown() string

Markdown renders the release for the GUI.

func (Release) Text

func (r Release) Text() string

Text renders the release for a terminal: markdown emphasis is removed.

type Section

type Section struct {
	Title   string
	Entries []string
}

Section is a group of entries under a "###" heading ("Features", "Bug Fixes"). Title is empty for entries that come before any heading.

Jump to

Keyboard shortcuts

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