version

package
v0.0.0-...-fe1559e Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotCompareDifferentRelease = fmt.Errorf("cannot compare versions with different release types")

Functions

This section is empty.

Types

type Version

type Version struct {
	Release     string
	Major       int
	Minor       int
	Maintenance string
}

Version represents an IOS-XE version https://sec.cloudapps.cisco.com/security/center/resources/ios_nx_os_reference_guide#release_naming_ios_xe

func NewVersion

func NewVersion(ver string) (Version, error)

NewVersion returns a parsed version

func (Version) Compare

func (v1 Version) Compare(v2 Version) (int, error)

Compare returns an integer comparing two version. The result will be 0 if v1==v2, -1 if v1 < v2, and +1 if v1 > v2.

func (Version) String

func (v Version) String() string

String returns the full version string

Jump to

Keyboard shortcuts

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