Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedEcosystem = errors.New("unsupported ecosystem")
Functions ¶
This section is empty.
Types ¶
type AlpineVersion ¶ added in v1.7.4
type AlpineVersion struct {
// contains filtered or unexported fields
}
AlpineVersion represents a version of an Alpine package.
Currently, the APK version specification is as follows: *number{.number}...{letter}{\_suffix{number}}...{~hash}{-r#}*
Each *number* component is a sequence of digits (0-9).
The *letter* portion can follow only after end of all the numeric version components. The *letter* is a single lower case letter (a-z). This can follow one or more *\_suffix{number}* components. The list of valid suffixes (and their sorting order) is: *alpha*, *beta*, *pre*, *rc*, <no suffix>, *cvs*, *svn*, *git*, *hg*, *p*
This can be follows with an optional *{~hash}* to indicate a commit hash from where it was built. This can be any length string of lower case hexadecimal digits (0-9a-f).
Finally, an optional package build component *-r{number}* can follow.
Also see https://github.com/alpinelinux/apk-tools/blob/master/doc/apk-package.5.scd#package-info-metadata
func (AlpineVersion) Compare ¶ added in v1.7.4
func (v AlpineVersion) Compare(w AlpineVersion) int
func (AlpineVersion) CompareStr ¶ added in v1.7.4
func (v AlpineVersion) CompareStr(str string) int
type CRANVersion ¶ added in v1.5.0
type CRANVersion struct {
// contains filtered or unexported fields
}
CRANVersion is the representation of a version of a package that is held in the CRAN ecosystem (https://cran.r-project.org/).
A version is a sequence of at least two non-negative integers separated by either a period or a dash.
See https://astrostatistics.psu.edu/su07/R/html/base/html/package_version.html
func (CRANVersion) Compare ¶ added in v1.5.0
func (v CRANVersion) Compare(w CRANVersion) int
func (CRANVersion) CompareStr ¶ added in v1.5.0
func (v CRANVersion) CompareStr(str string) int
type Components ¶
func (*Components) Cmp ¶
func (components *Components) Cmp(b Components) int
type DebianVersion ¶
type DebianVersion struct {
// contains filtered or unexported fields
}
func (DebianVersion) Compare ¶
func (v DebianVersion) Compare(w DebianVersion) int
func (DebianVersion) CompareStr ¶
func (v DebianVersion) CompareStr(str string) int
type MavenVersion ¶
type MavenVersion struct {
// contains filtered or unexported fields
}
func (MavenVersion) Compare ¶
func (mv MavenVersion) Compare(w MavenVersion) int
func (MavenVersion) CompareStr ¶
func (mv MavenVersion) CompareStr(str string) int
type NuGetVersion ¶
type NuGetVersion struct {
SemverLikeVersion
}
func (NuGetVersion) Compare ¶
func (v NuGetVersion) Compare(w NuGetVersion) int
func (NuGetVersion) CompareStr ¶
func (v NuGetVersion) CompareStr(str string) int
type PackagistVersion ¶
func (PackagistVersion) Compare ¶
func (v PackagistVersion) Compare(w PackagistVersion) int
func (PackagistVersion) CompareStr ¶
func (v PackagistVersion) CompareStr(str string) int
type PyPIVersion ¶
type PyPIVersion struct {
// contains filtered or unexported fields
}
func (PyPIVersion) Compare ¶
func (pv PyPIVersion) Compare(pw PyPIVersion) int
func (PyPIVersion) CompareStr ¶
func (pv PyPIVersion) CompareStr(str string) int
type RedHatVersion ¶ added in v1.9.2
type RedHatVersion struct {
// contains filtered or unexported fields
}
func (RedHatVersion) CompareStr ¶ added in v1.9.2
func (v RedHatVersion) CompareStr(str string) int
type RubyGemsVersion ¶
func (RubyGemsVersion) Compare ¶
func (v RubyGemsVersion) Compare(w RubyGemsVersion) int
func (RubyGemsVersion) CompareStr ¶
func (v RubyGemsVersion) CompareStr(str string) int
type SemverLikeVersion ¶
type SemverLikeVersion struct { LeadingV bool Components Components Build string Original string }
SemverLikeVersion is a version that is _like_ a version as defined by the Semantic Version specification, except with potentially unlimited numeric components and a leading "v"
func ParseSemverLikeVersion ¶
func ParseSemverLikeVersion(line string, maxComponents int) SemverLikeVersion
type SemverVersion ¶
type SemverVersion struct {
SemverLikeVersion
}
func (SemverVersion) Compare ¶
func (v SemverVersion) Compare(w SemverVersion) int
func (SemverVersion) CompareStr ¶
func (v SemverVersion) CompareStr(str string) int