bumpvalidator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package bumpvalidator provides validation for semver bumps.

Index

Constants

View Source
const (
	VersionMajor = "major"
	VersionMinor = "minor"
	VersionPatch = "patch"
)

VersionKind constants start with Version

Variables

This section is empty.

Functions

func Validate

func Validate(old, new semver.Version) error

Validate validates the updating from one version to another.

Types

type RetrogressiveUpdateError

type RetrogressiveUpdateError struct {
	From, To    uint64
	VersionKind VersionKind
}

RetrogressiveUpdateError is an error that signals that a version was erroneously decremented.

func (RetrogressiveUpdateError) Error

func (e RetrogressiveUpdateError) Error() string

Error implements (error).Error

type VersionKind

type VersionKind string

VersionKind represents a kind of version.

type VersionSkippedError

type VersionSkippedError struct {
	Major, Minor, Patch uint64
}

VersionSkippedError is an error that signals that a version was skipped.

func (VersionSkippedError) Error

func (e VersionSkippedError) Error() string

Error implements (error).Error

Jump to

Keyboard shortcuts

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