verdict

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 6 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 verdict reads a judge's verdict file, the shape steps/judge.md fixes: a header of `key: value` lines up to the first `## ` heading, then prose the parser ignores except for counting the `## Changes` items.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoVerdict is a header without a `verdict:` line.
	ErrNoVerdict = errors.New("verdict: no verdict line")
	// ErrBadVerdict is a `verdict:` value outside Verdicts.
	ErrBadVerdict = errors.New("verdict: unknown verdict")
)
View Source
var Verdicts = []string{"proceed", "proceed with changes", "rethink", "stop"}

Verdicts are the four values a `verdict:` line may hold.

Functions

func Latest added in v0.58.0

func Latest(dir string) string

Latest is the newest verdict file in dir, or "".

func Series added in v0.58.0

func Series(dir string) []string

Series is the verdict files in dir, oldest first. Parsing is left to the caller, because each treats a file that does not parse its own way.

Types

type File

type File struct {
	Task     string // empty for an idea
	Subject  string // kind and reference: `task FT-76`, `idea <one line>`, ...
	Verdict  string
	Reason   string
	Run      string // standalone, ship before pr, ship after pr
	Blind    bool
	Decision string // ship runs only
	Changes  int    // numbered items under `## Changes`
}

File is one verdict file's header.

func Parse

func Parse(text string) (*File, error)

Parse reads a verdict file's text.

func (*File) Idea

func (f *File) Idea() bool

Idea reports whether the subject is an idea, which belongs to no task.

Jump to

Keyboard shortcuts

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