errorcodes

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errorcodes extracts the framework's diagnostic codes from the runtime source of truth and renders the generated error-code reference page. The page is never hand-maintained: TestErrorCodeReferenceIsGenerated regenerates it from internal/runtime/diagnostic_metadata.go and fails if the committed page drifts, so every code a developer (or agent) can see in a report is always looked-up-able with its cause anchor and remediation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderPage

func RenderPage(parseCodes []ErrorCode) string

RenderPage renders the committed error-code reference markdown from codes.

Types

type ErrorCode

type ErrorCode struct {
	Code        string
	Docs        string
	Remediation string
}

ErrorCode is one diagnostic code with its docs anchor and remediation text.

func ExtractCodes

func ExtractCodes(parseSource string) []ErrorCode

ExtractCodes parses the diagnostic-metadata source and returns every code, sorted by code, deduplicated (the descriptive switch wins over the phase-keyed panic helpers, which only add codes the switch omits).

Jump to

Keyboard shortcuts

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