stage

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT 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 string

func (Stage) String

func (s Stage) String() string

String returns the string of the stage.

type StagePrio

type StagePrio struct {
	// The stage.
	Stage Stage

	// The stage priority, lower priority come before other stage.
	Priority int
}

func (StagePrio) IsAfter

func (s StagePrio) IsAfter(other StagePrio) bool

IsAfter returns true if the stage is right after `other`. Meaning the priority is +1.

func (StagePrio) IsBefore

func (s StagePrio) IsBefore(other StagePrio) bool

IsBefore returns true if the stage is right before `other`. Meaning the priority is +1.

func (*StagePrio) Less

func (s *StagePrio) Less(other *StagePrio) int

Less returns `-1` if `s` has lower priority than `other`, and `0` if equal and `1` if greater.

type Stages

type Stages []StagePrio

func NewDefaults

func NewDefaults() Stages

Construct default stage.

func (Stages) Contains

func (s Stages) Contains(stage Stage) bool

Contains returns if the stage `stage` is contained.

func (Stages) Find

func (s Stages) Find(stage Stage) (st StagePrio, exists bool)

Find returns the stage with name `stage`.

func (Stages) Len

func (s Stages) Len() int

Len implements the sort.Sort interface.

func (Stages) Less

func (s Stages) Less(i, j int) bool

Less implements the sort.Sort interface.

func (Stages) Swap

func (s Stages) Swap(i, j int)

Swap implements the sort.Sort interface.

type TargetNameToStageMapper

type TargetNameToStageMapper func(targetName string) (Stage, error)

Jump to

Keyboard shortcuts

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