version

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion(showShort bool, needCommit bool) string

GetVersion return string with Tarantool CLI version info.

func IsLess added in v1.2.0

func IsLess(verLeft Version, verRight Version) bool

IsLess returns true if verLeft is less than verRight.

Types

type Release

type Release struct {
	Type ReleaseType
	Num  uint64
	// contains filtered or unexported fields
}

func (Release) String added in v1.3.0

func (release Release) String() string

type ReleaseType

type ReleaseType uint16
const (
	TypeNightly ReleaseType = iota
	TypeAlpha
	TypeBeta
	TypeRC
	TypeRelease

	// CliSeparator is used in commands to specify version. E.g: program=version.
	CliSeparator = "="
	// FsSeparator is used in file names to specify version. E.g: program_version.
	FsSeparator = "_"
)

type Version

type Version struct {
	Major      uint64  // Major
	Minor      uint64  // Minor
	Patch      uint64  // Patch
	Additional uint64  // Additional commits.
	Revision   uint64  // Revision number.
	Release    Release // Release type.
	Hash       string  // Commit hash.
	Str        string  // String representation.
	Tarball    string  // Tarball name.
	BuildName  string  // Custom build name.
}

func Parse added in v1.0.0

func Parse(verStr string) (Version, error)

Parse parses a version string and return the version value it represents.

type VersionSlice added in v1.0.0

type VersionSlice []Version

VersionSlice attaches the methods of sort.Interface to []Version, sorting from oldest to newest.

func (VersionSlice) Len added in v1.0.0

func (v VersionSlice) Len() int

sort.Interface Len implementation

func (VersionSlice) Less added in v1.0.0

func (v VersionSlice) Less(i, j int) bool

sort.Interface Less implementation, sorts from oldest to newest

func (VersionSlice) Swap added in v1.0.0

func (v VersionSlice) Swap(i, j int)

sort.Interface Swap implementation

Jump to

Keyboard shortcuts

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