semver

package
v0.0.0-...-b5eea13 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 7

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 implements Semantic Versioning according to https://semver.org.

func NewSemVer

func NewSemVer(major uint16, minor uint16, patch uint16) *SemVer

NewSemVer creates a new SemVer from the given major, minor and patch versions.

func NewSemVerFromString

func NewSemVerFromString(versionString string) (*SemVer, error)

NewSemVerFromString creates a new SemVer from the given version string and returns an error on failure.

func (*SemVer) AtLeast

func (version *SemVer) AtLeast(fromVersion *SemVer) bool

AtLeast checks whether this version is equal to or higher than fromVersion.

func (SemVer) MarshalJSON

func (version SemVer) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*SemVer) String

func (version *SemVer) String() string

func (*SemVer) UnmarshalJSON

func (version *SemVer) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler.

Jump to

Keyboard shortcuts

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