verdict

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 5 Imported by: 0

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.

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

This section is empty.

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
}

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