version

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	AppVersion = "1.15.1"
)

Variables

This section is empty.

Functions

func CheckUpdate

func CheckUpdate() (hasUpdate bool, msg string, err error)

CheckUpdate fetches the latest mieru / mita version using GitHub API and check if a new release is available.

Types

type Version

type Version struct {
	Major int
	Minor int
	Patch int
}

Version defines the components of version number.

func Parse

func Parse(s string) (Version, error)

Parse constructs the version from a string.

func ParseTag

func ParseTag(tag string) (Version, error)

ParseTag constructs the version from a tag name.

func (Version) LessThan

func (v Version) LessThan(another Version) bool

LessThan returns true if the current version is less than the compared version.

func (Version) String

func (v Version) String() string

String returns the string representation of version number, e.g. "1.0.0".

func (Version) ToTag

func (v Version) ToTag() string

ToTag returns the associated tag name of the version, e.g. "v1.0.0".

Jump to

Keyboard shortcuts

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