Help us shape the future of Go! Take the 2026 Go Developer Survey

docs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package docs creates and checks the ADR and plan records described in docs/docs-format.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(root, kind, title string, now time.Time) (string, error)

New creates a record of the given kind ("adr" or "plan") under root and returns its root-relative slash path. The file is created exclusively; the timestamp advances by 1 ms on a collision.

Types

type Problem

type Problem struct {
	Path string
	Line int
	Msg  string
}

Problem is one violation of the format. Line is 1 for file-level problems.

func (Problem) String

func (p Problem) String() string

type Result

type Result struct {
	Records  int
	Problems []Problem
}

Result is the outcome of Check: the number of records read and the sorted problems.

func Check

func Check(root string) (Result, error)

Check validates every record under root. The error is for I/O failures only.

Jump to

Keyboard shortcuts

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