review

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package review shows a person what the machine proposes, for them to accept or refuse: a page any browser opens, and a question on the terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choice

func Choice(in *bufio.Reader, out io.Writer, question string) (string, bool)

Choice asks a question on out and reads a line from in: the lower-cased answer, or "" with no answer.

func Docs

func Docs(repo string, docs []string, in *bufio.Reader, out io.Writer, view func(string) error) (bool, error)

Docs has a person keep or drop each doc changed in the working tree, one at a time, a page showing the change on `v`; those kept are committed alone, in one `docs:` commit, whatever else is staged. It says whether it committed.

func Open

func Open(path string) error

Open opens a file with the system's default program for it.

func Page

func Page(repo, name, title, intro string, sections []Section) (string, error)

Page writes one self-contained page, in the repository's git folder, and returns its path. It needs nothing but a browser.

Types

type Section

type Section struct {
	Heading, Meta, Message, Stat, Patch string
}

Section is one part of a page: a commit, or a doc changed.

Jump to

Keyboard shortcuts

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