semver

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SemVer

type SemVer struct {
	// contains filtered or unexported fields
}

SemVer is a struct to contain a SemVer of an image tag.

func Parse

func Parse(tag string) *SemVer

func (*SemVer) Equal added in v0.1.1

func (s *SemVer) Equal(other *SemVer) bool

Equal will return true if the given semver is equal.

func (*SemVer) HasMetaData

func (s *SemVer) HasMetaData() bool

HasMetaData returns whether this SemVer has metadata. MetaData is defined as a tag containing anything after the patch digit. e.g. v1.0.1-gke.3, v1.0.1-alpha.0, v1.2.3.4

func (*SemVer) LessThan

func (s *SemVer) LessThan(other *SemVer) bool

LessThan will return true if the given semver is equal, or larger that the calling semver. If the calling SemVer has metadata, then ASCII comparison will take place on the version. e.g. v1.0.1-alpha.1 < v1.0.1-beta.0

func (*SemVer) Major

func (s *SemVer) Major() int64

Major returns the major version of this SemVer.

func (*SemVer) Minor

func (s *SemVer) Minor() int64

Minor returns the minor version of this SemVer.

func (*SemVer) Patch

func (s *SemVer) Patch() int64

Patch returns the patch version of this SemVer.

func (*SemVer) String

func (s *SemVer) String() string

Jump to

Keyboard shortcuts

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