state

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package state is the task state machine — the single source of truth for which board moves are legal.

Index

Constants

This section is empty.

Variables

View Source
var Statuses = []string{"backlog", "queued", "running", "review", "done", "failed", "cancelled"}

Statuses are the board columns, in lifecycle order.

View Source
var Transitions = map[string]map[string]bool{
	"backlog":   {"queued": true, "cancelled": true},
	"queued":    {"running": true, "cancelled": true, "failed": true, "backlog": true},
	"running":   {"review": true, "failed": true, "cancelled": true},
	"review":    {"done": true, "queued": true, "cancelled": true},
	"failed":    {"queued": true, "backlog": true, "cancelled": true},
	"done":      {"queued": true},
	"cancelled": {"backlog": true, "queued": true},
}

Transitions maps a status to everything it may become.

Functions

func Check

func Check(old, new string) error

Check reports whether old -> new is allowed. Staying put is always fine.

Types

type IllegalTransition

type IllegalTransition struct{ Msg string }

IllegalTransition is returned for any move the machine forbids.

func (*IllegalTransition) Error

func (e *IllegalTransition) Error() string

Jump to

Keyboard shortcuts

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