errors

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package errors defines the domain errors for the board.

The CLI renders them as "error: <message>" and exits non-zero. Keeping a small typed error set means the core stays a plain library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCode added in v0.7.0

func ExitCode(err error) int

ExitCode maps an error to the universal CLI exit-code contract, identical in every output mode: 0 success, 1 internal, 2 invalid/usage, 3 not_found, 4 conflict.

Types

type BoardError

type BoardError interface {
	error
	Code() string
	Message() string
}

BoardError is the interface implemented by all board errors. Each carries a short machine code and a human message.

func As

func As(err error) (BoardError, bool)

As reports whether err is a BoardError, returning it if so.

func Conflict

func Conflict(message string) BoardError

Conflict: the operation is illegal in the current state (e.g. a bad transition).

func Invalid

func Invalid(message string) BoardError

Invalid: the request itself is malformed (e.g. an unknown status).

func NotFound

func NotFound(message string) BoardError

NotFound: a task or board could not be found.

Jump to

Keyboard shortcuts

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