signal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 5 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 signal writes and reads a pursuit's signal as markdown: its claim, its direction (what counts for and what counts against), the window it is read in and its resolver, every part checked present and every problem reported together on one line. It does no I/O and resolves nothing; callers hand it text and the day it is, and keep what it returns.

Index

Constants

View Source
const Layout = "2006-01-02"

Layout is how a window is written: a date, YYYY-MM-DD.

Variables

This section is empty.

Functions

func Check

func Check(s Signal, today time.Time) []string

Check returns every problem with s on the day today falls on, in the order the parts are written: a part left empty, and a window that is not a date or is before today. None means s may be recorded.

func Problems

func Problems(problems []string) error

Problems is the one error for every problem with a signal, on one line.

func Template

func Template(ideaText string) string

Template returns the markdown to edit: the idea's text as the title, then the four parts in order, each with a line of guidance in a comment.

Types

type Signal

type Signal struct {
	Claim    string // what should change, in the team's words
	For      string // what counts as for the claim
	Against  string // what counts as against it
	Window   string // the day it is read, YYYY-MM-DD
	Resolver string // who or what reports the result: a named person or check
}

Signal is what a pursuit is read against. Every part is required.

func Parse

func Parse(md string, today time.Time) (Signal, error)

Parse reads a signal from markdown and checks it on the day today falls on. Headings match without regard to case or surrounding space, comments are dropped and the title line is ignored. Under Direction, "For:" and "Against:" each start their part. Every problem found is returned together in one error.

func Trim

func Trim(s Signal) Signal

Trim returns s with the space around each part removed.

Jump to

Keyboard shortcuts

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