frontmatter

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package frontmatter reads and parses YAML frontmatter from spec nodes, test nodes, and external dependency files.

spec: ROOT/tech_design/internal/frontmatter@v27

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependsOn

type DependsOn struct {
	LogicalName string
	Filter      []string
}

DependsOn represents a single entry in the depends_on list.

type Frontmatter

type Frontmatter struct {
	DependsOn  []DependsOn
	Implements []string
}

Frontmatter holds the parsed frontmatter fields. All fields are optional at the parsing level.

func ParseFrontmatter

func ParseFrontmatter(filePath string) (*Frontmatter, error)

ParseFrontmatter reads the file at filePath, extracts the YAML frontmatter block (between the first and second "---" lines), parses it, and returns the result. It reads line by line and stops as soon as the closing "---" is found — the file body is never read.

Jump to

Keyboard shortcuts

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