Documentation
¶
Index ¶
- func ChangeTypeLabel(changeType ChangeType) string
- func CompleteReleasesAsFirstArgument(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func FindChangelogIn(directory string) (string, bool)
- func HasChanges(sections *([]Section)) bool
- func ResolvePathToChangelog() (string, error)
- func Search(changelog *Changelog, query string) string
- func Show(contents string) error
- type Bounds
- type ChangeType
- type Changelog
- func (changelog *Changelog) AddItem(changeType ChangeType, contents string) string
- func (changelog *Changelog) ContentWithin(bounds *Bounds) string
- func (changelog *Changelog) Diff(from string, to string) (string, error)
- func (changelog *Changelog) DiffLen(other string) int
- func (changelog *Changelog) FindRelease(version string) *Release
- func (changelog *Changelog) Merge(from string, to string, prefixItemsWithVersion bool) (string, error)
- func (changelog *Changelog) ReplacedWithinBounds(bounds Bounds, replacement string) string
- func (changelog *Changelog) Stop() int
- func (changelog *Changelog) WithAddition(insertionPoint int, addition string) string
- func (changelog *Changelog) Yank(version string) (string, error)
- type Item
- type NewLines
- type NextRelease
- type Release
- type Releases
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeTypeLabel ¶
func ChangeTypeLabel(changeType ChangeType) string
func CompleteReleasesAsFirstArgument ¶
func CompleteReleasesAsFirstArgument( cmd *cobra.Command, args []string, toComplete string, ) ([]string, cobra.ShellCompDirective)
Can be passed as ValidArgsFunction to support custom completions if the first argument is a released version.
func FindChangelogIn ¶
func HasChanges ¶
func ResolvePathToChangelog ¶
Types ¶
type Bounds ¶
func EmptyBounds ¶
func EmptyBounds() Bounds
type ChangeType ¶
type ChangeType int64
const ( Added ChangeType = iota Changed Deprecated Fixed Removed Security Unknown )
func KnownChangeTypes ¶
func KnownChangeTypes() []ChangeType
func LastChangeType ¶
func LastChangeType() ChangeType
func ParseChangeType ¶
func ParseChangeType(name string) ChangeType
type Changelog ¶
func ResolveChangelog ¶
func (*Changelog) AddItem ¶
func (changelog *Changelog) AddItem(changeType ChangeType, contents string) string
func (*Changelog) ContentWithin ¶
func (*Changelog) FindRelease ¶
func (*Changelog) Merge ¶
func (changelog *Changelog) Merge(from string, to string, prefixItemsWithVersion bool) (string, error)
Merges
func (*Changelog) ReplacedWithinBounds ¶
func (*Changelog) WithAddition ¶
type NextRelease ¶
func (*NextRelease) FindSection ¶
func (next *NextRelease) FindSection(changeType ChangeType) *Section
type Release ¶
type Release struct { Sections []Section Date string Yanked bool Version string HeadlineBounds Bounds Bounds Bounds }
func NewRelease ¶
type Releases ¶
type Releases struct { Next *NextRelease Past []Release }
type Section ¶
type Section struct { Type ChangeType Items []Item Bounds Bounds }
Click to show internal directories.
Click to hide internal directories.