stage

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stage

type Stage uint8

Stage represents the stability of a version

const (
	// Stable should be used for plugins that are rarely changed in backwards-compatible ways, e.g. bug fixes.
	Stable Stage = iota
	// Beta should be used for plugins that may be changed in minor ways and are not expected to break between uses.
	Beta Stage = iota
	// Alpha should be used for plugins that are frequently changed and may break between uses.
	Alpha Stage = iota
)

Order Stage in decreasing degree of stability for comparison purposes. Stable must be 0 so that it is the default Stage

func ParseStage

func ParseStage(stage string) (Stage, error)

ParseStage parses stage into a Stage, assuming it is one of the valid stages

func (Stage) Compare

func (s Stage) Compare(other Stage) int

Compare returns -1 if s < other, 0 if s == other, and 1 if s > other.

func (Stage) IsStable

func (s Stage) IsStable() bool

IsStable returns whether the stage is stable or not

func (*Stage) Parse

func (s *Stage) Parse(stage string) error

Parse parses stage inline, assuming it is one of the valid stages

func (Stage) String

func (s Stage) String() string

String returns the string representation of s

func (Stage) Validate

func (s Stage) Validate() error

Validate ensures that the stage is one of the valid stages

Jump to

Keyboard shortcuts

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