lifecycle

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0 Imports: 8 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 lifecycle moves a document through its statuses and rewrites the file. Nothing here prompts, prints or commits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendRationale

func AppendRationale(source []byte) []byte

AppendRationale adds the rejection rationale section to a document, as rejecting one does. `archdoc new --status=rejected` creates a document that is already rejected, so it needs the same section and the same prompt in it; this is exported so that there is one of each rather than a second copy in the templates.

func Apply

func Apply(d *repo.Document, to repo.Status, now time.Time, g git.Repository) ([]byte, error)

Apply moves a document to a new status and returns the rewritten file. The document on disk is not touched; writing it is the caller's business. g is the repository lint compares frozen documents against, nil outside git.

Types

type Unfinished added in v0.6.0

type Unfinished struct {
	ID       string
	To       repo.Status
	Findings []lint.Finding
}

Unfinished refuses a transition that would freeze a document lint reports errors about. It carries the findings rather than a rendering of them, so a caller presents them as it presents lint's own.

func (*Unfinished) Error added in v0.6.0

func (e *Unfinished) Error() string

Jump to

Keyboard shortcuts

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