Documentation
¶
Overview ¶
Package yaml is the YAML frontend: parses YAML workflows into the ir.Workflow IR. The decode path is YAML → any (goccy) → JSON (stdlib) → IR (the existing JSON unmarshalers in ir/), reusing the key-presence Node dispatch, the standard-surface Skip and Parallel marshalers, Duration's string/integer forms, and the digest-stable map-key ordering — without duplicating any of that.
Parse-time errors from goccy carry line:column inside *goccy/go-yaml/errors.SyntaxError (reachable via errors.As), so callers can surface position-aware diagnostics for YAML syntax issues. Position-aware SEMANTIC diagnostics (e.g. "field X at line Y is invalid") are deferred — a re-parse of the YAML AST by future validation would recover them when needed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode parses a YAML workflow document into an *ir.Workflow. The returned error wraps goccy's parse error (with line:column) on syntax failures; downstream errors include the failing stage for attribution.
func DecodeWithRaw ¶ added in v0.3.0
DecodeWithRaw parses a YAML workflow document into an *ir.Workflow, same as Decode, and also returns the top-level raw mapping from stage 1 of the decode pipeline (nil if the document's top level isn't a mapping). The raw tree lets a validator detect keys/values the typed unmarshal silently discarded — Decode itself doesn't need it, so it stays a thin wrapper.
Types ¶
This section is empty.