Documentation
¶
Overview ¶
Package version parses and increments SemVer versions, and matches them against a configurable tag-format template.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format struct {
// contains filtered or unexported fields
}
Format is a parsed tag-format template such as "v{{version}}" or "{{package}}-v{{version}}". {{package}} is accepted here even though single-mode matching (Match) never uses it — multi-mode range-finding reuses this same parser once it exists.
func ParseFormat ¶
ParseFormat compiles raw into a matcher. raw must contain {{version}} — a tag format that can't identify a version can't be used to find "the last release".
func (*Format) ForPackage ¶
ForPackage returns a Format with {{package}} resolved to name, so Match only matches tags belonging to that specific package (multi mode).
type SemVer ¶
type SemVer struct {
Major, Minor, Patch int
}
SemVer is a parsed major.minor.patch version. Pre-release and build metadata aren't supported — tag-format's {{version}} placeholder only matches bare major.minor.patch tags.
func (SemVer) GreaterThan ¶
GreaterThan reports whether v is a later version than o.