semver

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Zlib Imports: 3 Imported by: 0

Documentation

Overview

semver holds standard version structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Product    string
	Major      uint16
	Minor      uint16
	Patch      uint16
	PreRelease string
	InHex      bool
}

func Parse

func Parse(s string) (*Version, error)

func (*Version) Comp

func (v1 *Version) Comp(v2 *Version) (r int)

Compare v1 to v2.

-1 if v1 <  v2
 0 if v1 == v2
+1 if v1 >  v2

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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