semantic

package
v0.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedEcosystem = errors.New("unsupported ecosystem")

Functions

This section is empty.

Types

type Components

type Components []*big.Int

func (*Components) Cmp

func (components *Components) Cmp(b Components) int

func (*Components) Fetch

func (components *Components) Fetch(n int) *big.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

type PackagistVersion struct {
	Original   string
	Components []string
}

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 RubyGemsVersion

type RubyGemsVersion struct {
	Original string
	Segments []string
}

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

type Version

type Version interface {
	// CompareStr returns an integer representing the sort order of the given string
	// when parsed as the concrete Version relative to the subject Version.
	//
	// The result will be 0 if v == w, -1 if v < w, or +1 if v > w.
	CompareStr(str string) int
}

func MustParse

func MustParse(str string, ecosystem internal.Ecosystem) Version

func Parse

func Parse(str string, ecosystem internal.Ecosystem) (Version, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL