version

package
v0.0.0-...-132cbc5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(versions []*Version)

Sort sorts the given slice of Version

Types

type Version

type Version struct {
	LeadingV bool
	Semver   *semver.Version
}

Version wraps semver and includes flag for leading `v`

func New

func New(version string) *Version

New creates a new version from a string

func (Version) Bump

func (v Version) Bump(scope string) error

Bump the version string according to scope

func (Version) String

func (v Version) String() string

String returns semantic version string including leading `v` if necessary

type Versions

type Versions []*Version

Versions is a slice of Version

func (Versions) Len

func (s Versions) Len() int

func (Versions) Less

func (s Versions) Less(i, j int) bool

func (Versions) Swap

func (s Versions) Swap(i, j int)

Jump to

Keyboard shortcuts

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