Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrParsing = errors.New("there was an error parsing")
)
Functions ¶
This section is empty.
Types ¶
type Changelog ¶
type Changelog struct { // The https://keepachangelog.com version of this file. KeepAChangelogVersion string // The semantic version policy this file conforms. SemVerVersion string // Any header comments that might exist before the main body of contents. CommentHeader []string // The title of the changelog. Generally will be "Changelog". Title string // The description body about the change log and what it conforms to. Description []string // The collection of releases provided by this changelog file. Releases []Release // The collection of links showing the differences between release versions. Links []Link }
The Changelog structure contains the entire changelog. It may be populated from a file or programatically.
func (*Changelog) ToMarkdown ¶
ToMarkdown converts the Changelog structure into a markdown formatted stream of characters and returns the string.
type Link ¶
type Link struct { // The version of the release. It could be v1.0.2, 1.0.3-pre1 or Unreleased // as examples. Version string // The following URL that describes the difference between this release and // the previous release Url string }
The Link structure containing the release version and the representing URL.
func (*Link) ToMarkdown ¶
ToMarkdown converts the Link structure into a markdown formatted stream of characters and returns the string.
type Release ¶
type Release struct { // The entire text following the ## prefix. Title string // The version of the release. It could be v1.0.2, 1.0.3-pre1 or Unreleased // as examples. Version string // The date of the release if present. Date *time.Time // If a release has been yanked. Yanked bool // The lines under the '### Added` header. Added []string // The lines under the '### Changed' header. Changed []string // The lines under the '### Depreceted' header. Deprecated []string // The lines under the '### Removed' header. Removed []string // The lines under the '### Fixed' header. Fixed []string // The lines under the '### Security' header. Security []string // The lines the might immediately follow the release line but not be // associated with any specific header. Other []string // The entire body of the release in case that is useful. Body []string }
Release represents a documented release.
func (*Release) ToMarkdown ¶
ToMarkdown converts the Release structure into a markdown formatted stream of characters and returns the string.
Click to show internal directories.
Click to hide internal directories.