versionops

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MajorMode = "major"
	MinorMode = "minor"
	PatchMode = "patch"
)

Variables

View Source
var (
	ErrInvalidVersionFormat = errorx.NewType(errorx.CommonErrors, "ErrInvalidVersionFormat")
	ErrUnknownMode          = errorx.NewType(errorx.CommonErrors, "ErrUnknownMode")
)

Functions

func HandleMode

func HandleMode(
	version string, modeString string, majorHandler VersionHandler, minorHandler VersionHandler,
	patchHandler VersionHandler,
) (string, error)

func Increase

func Increase(version string, modeString string) (string, error)

func IncreaseMajor

func IncreaseMajor(version string) (string, error)

func IncreaseMinor

func IncreaseMinor(version string) (string, error)

func IncreasePatch

func IncreasePatch(version string) (string, error)

func Release

func Release(version string) (string, error)

func RemoveMinor

func RemoveMinor(version string) (string, error)

func RemovePatch

func RemovePatch(version string) (string, error)

func Snapshot

func Snapshot(version string) (string, error)

func SuffixSnapshot

func SuffixSnapshot(version string, suffix string) (string, error)

func Verify

func Verify(version string) error

Types

type Mode

type Mode string

type VersionHandler

type VersionHandler func(string) (string, error)

Jump to

Keyboard shortcuts

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