Documentation ¶
Overview ¶
Package merger contains the Merger object, which incorporates a changelog.Changelog into a full markdown changelog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Merger ¶
type Merger struct { // ReleasedOn is a function that returns the date in which the new section was released. It defaults to time.Now. ReleasedOn func() time.Time // contains filtered or unexported fields }
Merger is an object that can incorporate a changelog.Changelog (section) into an existing CHANGELOG.md document.
func New ¶
New creates a Merger that will integrate the supplied changelog.Changelog into a full Markdown document that contains changelogs for older versions. The inserted section will be marked as being the changelog for the version specified in the supplied semver.Version, and also marked as released on the date returned by Merger.ReleasedOn. Merger is an immutable object and does not modify the changelog.Changelog object, nor the original document supplied to Merge.
func (Merger) Merge ¶
Merge uses the configured changelog and version to read the current, full changelog in Markdown format from srcChangelog, and write to dst a new full changelog containing the entries specified in the changelog.Changelog object that was passed to New. The source file is left intact and the changelog.Changelog object supplied to New are not modified.