semverimage

package
v0.0.0-...-88a3487 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Major int /* major version */
	Minor int /* minor version, or -1 */
	Patch int /* patch version, or -1 */
}

func NewVersion

func NewVersion(str string) (*Version, error)

Parse version string for form "major.minor.patch", where minor and patch are optional

func (*Version) GreaterThan

func (ver *Version) GreaterThan(otherVer *Version) bool

Return true if this version is greater than other version

func (*Version) IsCompatible

func (ver *Version) IsCompatible(otherVer *Version) bool

Return true if current version is compatible with other version.

"1" is compatible with "1.x.y" for any x, y
"1.2" is compatible with "1.2.y", for an y
"1.2.3" is compatible with "1.2.3" only

func (*Version) String

func (ver *Version) String() string

Jump to

Keyboard shortcuts

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