version

package
v8.5.9+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result int32

Result is the compare result type. Available types are Invalid, Smaller, Equal or Larger.

const (
	// Smaller when the compared version is smaller than the latest one.
	Smaller Result = -1
	// Equal when the compared version is equal with the latest one.
	Equal Result = 0
	// Larger when the compared version is larger than the latest one.
	Larger Result = 1
	// Invalid means that an error occurred when comparing the versions.
	Invalid Result = -2
)

type Version

type Version struct {
	version.Version
	WrittenAt    time.Time
	ChangelogURL string
}

Version is a version wrapper which contains some additional customized properties.

func Acquire

func Acquire() (v Version)

Acquire returns the latest version info wrapper. It calls the fetch.

func (*Version) Compare

func (v *Version) Compare(versionStr string) Result

Compare compares the "versionStr" with the latest Iris version, opossite to the version package it returns the result of the "versionStr" not the "v" itself.

Jump to

Keyboard shortcuts

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