vers

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package vers provides version checking functionalities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check added in v0.1.9

func Check(ver string, spec ...string) bool

Check checks if a verion "ver" satisfies any of the semantic versions in "spec".

`>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`. Not `4.2.1`, `2.1.1`

Since 0.1.9

func IsCompatible deprecated

func IsCompatible(ver string, spec []string) bool

IsCompatible checks if a verion "ver" satisfies semantic version spec.

`>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`. Not `4.2.1`, `2.1.1`

Deprecated: Should use Check() which would panic if version is invalid.

Since 0.1.7

Types

type VersionGetter

type VersionGetter interface {
	GetVersion() string
}

VersionGetter defines GetVersion()

Since 0.1.7

Jump to

Keyboard shortcuts

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