template

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: AGPL-3.0, MIT Imports: 6 Imported by: 0

README

{{ .Name }}

The design record and current specification for {{ .Name }}, managed with ArchDoc.

  • rfc/ proposes how something should work, and has a page in the spec once built.
  • adr/ records a decision that constrains designs across the spec.
  • spec/ describes how the project works right now, and is always current.
  • ref/ holds research and background material, never normative.

INDEX.md lists every document and how they relate; it is generated, so do not edit it by hand.

Read PROCESS.md before adding anything.

Documentation

Overview

Package template holds the files archdoc writes: the document templates, the process description, and the scaffolding init produces. They are embedded so that the binary carries everything a repository needs.

Index

Constants

This section is empty.

Variables

View Source
var Files embed.FS

Files is every embedded file, exposed so that init can write out the ones it scaffolds without rendering them.

Functions

func Render

func Render(name string, data Data) ([]byte, error)

Render substitutes data into the named embedded template. A document is created as a draft unless the caller says otherwise, so a zero Data never writes an empty status.

Types

type Data

type Data struct {
	ID      string
	Title   string
	Date    string
	Name    string
	Version string

	// Status is the lifecycle status to create the document in. Backfilled
	// documents arrive terminal; everything else starts as a draft.
	Status string
	// Decided is the date a terminal document reached its status.
	Decided string
	// Backfilled is the date the document was written, when it records a
	// decision taken earlier. Empty for an ordinary document.
	Backfilled string

	// Year is the copyright year, for the licence.
	Year string
	// WorkingDirectory is where the generated workflow runs archdoc: the path
	// from the git repository root to the directory holding archdoc.json.
	WorkingDirectory string
}

Data is the substitution set. A field left empty renders as absent rather than as an empty value, so the same template serves an ordinary draft and a backfilled document.

Jump to

Keyboard shortcuts

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