semver

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STANDARD = "stardand"
	ALPHA    = "alpha"
	BETA     = "beta"
)

Variables

View Source
var MAJOR, MINOR, PATCH int = 0, 1, 2
View Source
var MATCH = map[string]int{
	"MAJOR": 1,
	"MINOR": 2,
	"PATCH": 3,
}
View Source
var SEMVER_REGEX string = `` /* 185-byte string literal not displayed */

Functions

func IsVersionValid

func IsVersionValid(version string) error

Types

type SemVer

type SemVer struct {
	Version string
}

func New

func New(Version string) SemVer

func (SemVer) FindVersion

func (sem SemVer) FindVersion() (Version, error)

func (SemVer) IsVersionValid

func (sem SemVer) IsVersionValid() bool

type Version

type Version struct {
	Major int
	Minor int
	Path  int
}

func (Version) ConvertToSemver

func (version Version) ConvertToSemver() SemVer

func (*Version) IncrementVersion

func (version *Version) IncrementVersion(level string, mode string)

Jump to

Keyboard shortcuts

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