versioncmp

package
v0.15.0-rancher2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 2 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package versioncmp provides functions for comparing version strings.

Version strings are dot-separated integers with an optional pre-release suffix. A pre-release suffix is an arbitrary string with a leading dash character. All functions ignore these suffixes, so "1.2" and "1.2-rc" are considered equivalent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(v, other string) bool

Equal checks if a version is equal to another.

func GreaterThan

func GreaterThan(v, other string) bool

GreaterThan checks if a version is greater than another.

func GreaterThanOrEqualTo

func GreaterThanOrEqualTo(v, other string) bool

GreaterThanOrEqualTo checks if a version is greater than or equal to another.

func LessThan

func LessThan(v, other string) bool

LessThan checks if a version is less than another.

func LessThanOrEqualTo

func LessThanOrEqualTo(v, other string) bool

LessThanOrEqualTo checks if a version is less than or equal to another.

Types

This section is empty.

Jump to

Keyboard shortcuts

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