github

package
v2.0.0-alpha.32 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidTag

func IsValidTag(tagVersion string) (bool, error)

IsValidTag returns true if the given string is a valid tag

Types

type SemanticVersion

type SemanticVersion struct {
	Version *semver.Version
}

SemanticVersion is a struct containing a semantic version

func GetLatestPreRelease

func GetLatestPreRelease() (result *SemanticVersion, err error)

GetLatestPreRelease gets the latest prerelease on GitHub

func GetLatestStableRelease

func GetLatestStableRelease() (result *SemanticVersion, err error)

GetLatestStableRelease gets the latest stable release on GitHub

func GetVersionTags

func GetVersionTags() ([]*SemanticVersion, error)

GetVersionTags gets the list of tags on the Wails repo It returns a list of sorted tags in descending order

func NewSemanticVersion

func NewSemanticVersion(version string) (*SemanticVersion, error)

NewSemanticVersion creates a new SemanticVersion object with the given version string

func (*SemanticVersion) IsGreaterThan

func (s *SemanticVersion) IsGreaterThan(version *SemanticVersion) (bool, error)

IsGreaterThan returns true if this version is greater than the given version

func (*SemanticVersion) IsGreaterThanOrEqual

func (s *SemanticVersion) IsGreaterThanOrEqual(version *SemanticVersion) (bool, error)

IsGreaterThanOrEqual returns true if this version is greater than or equal the given version

func (*SemanticVersion) IsPreRelease

func (s *SemanticVersion) IsPreRelease() bool

IsPreRelease returns true if it's a prerelease version

func (*SemanticVersion) IsRelease

func (s *SemanticVersion) IsRelease() bool

IsRelease returns true if it's a release version

func (*SemanticVersion) MainVersion

func (s *SemanticVersion) MainVersion() *SemanticVersion

MainVersion returns the main version of any version+prerelease+metadata EG: MainVersion("1.2.3-pre") => "1.2.3"

func (*SemanticVersion) String

func (s *SemanticVersion) String() string

type SemverCollection

type SemverCollection []*SemanticVersion

SemverCollection is a collection of SemanticVersion objects

func (SemverCollection) Len

func (c SemverCollection) Len() int

Len returns the length of a collection. The number of Version instances on the slice.

func (SemverCollection) Less

func (c SemverCollection) Less(i, j int) bool

Less is needed for the sort interface to compare two Version objects on the slice. If checks if one is less than the other.

func (SemverCollection) Swap

func (c SemverCollection) Swap(i, j int)

Swap is needed for the sort interface to replace the Version objects at two different positions in the slice.

Jump to

Keyboard shortcuts

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