semver

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bump

func Bump(version string, typ BumpType) (string, error)

Bump increase semantic version parts.

func Latest added in v0.6.0

func Latest(versions []string) (string, error)

Latest find latest version.

func LatestTag added in v0.7.3

func LatestTag(path string) (string, error)

Latest find latest git tag version.

Types

type BumpType added in v0.7.0

type BumpType int32

BumpType increases the version section number type.

const (
	Unspecific BumpType = iota
	Major
	Minor
	Patch
)

func ParseBumpType added in v0.7.0

func ParseBumpType(str string) BumpType

ParseBumpType parse string bump type.

func (BumpType) String added in v0.7.0

func (i BumpType) String() string

type Version added in v0.7.0

type Version struct {
	// contains filtered or unexported fields
}

Version implements semantic versioning handle.

func NewVersion added in v0.7.0

func NewVersion(prefix string) Version

NewVersion creates version handle.

func (Version) Bump added in v0.7.0

func (v Version) Bump(version string, typ BumpType) (string, error)

Bump increase semantic version parts.

func (Version) Latest added in v0.7.0

func (v Version) Latest(versions []string) (string, error)

Latest find latest version.

func (Version) LatestTag added in v0.7.3

func (v Version) LatestTag(path string) (string, error)

Latest find latest git tag version.

Jump to

Keyboard shortcuts

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