Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Render ¶
func Render(rows []plantree.RowWithPredicates, opts Options) (string, error)
Render renders the configured scalar appendices without a leading separator.
func ValidateSections ¶
ValidateSections validates an ordered print-section list.
Types ¶
type Options ¶
type Options struct {
// Sections selects appendix sections.
// A nil value uses the default SectionPredicates section.
// An explicitly empty value renders no appendix sections.
Sections *Sections
// ShowScalarVars prints scalar assignment variable names in semantic appendix sections.
ShowScalarVars bool
// ResolveScalarVars replaces direct scalar variable aliases in semantic appendix sections.
ResolveScalarVars bool
// ResolveScalarVarsRecursive recursively resolves scalar variable aliases in semantic appendix sections.
ResolveScalarVarsRecursive bool
}
Options configures appendix rendering.
type Preset ¶ added in v0.1.11
type Preset string
Preset selects an intent-based appendix section set.
const ( // PresetBasic prints predicate-like scalar links. PresetBasic Preset = "basic" // PresetEnhanced prints predicate, ordering, and aggregate sections. PresetEnhanced Preset = "enhanced" // PresetFull prints all scalar links, including unnamed links. PresetFull Preset = "full" // PresetNone suppresses appendix sections. PresetNone Preset = "none" )
func ParsePreset ¶ added in v0.1.11
ParsePreset parses one print preset name. Valid values are "basic", "enhanced", "full", and "none" (case-insensitive). Empty input is not a preset; use ParseSections for explicit-empty appendix semantics.
type Section ¶
type Section string
Section selects one appendix section printed after a rendered tree table.
const ( // SectionPredicates prints predicate-like scalar links. SectionPredicates Section = "predicates" // SectionOrdering prints ordering scalar links for sort operators. SectionOrdering Section = "ordering" // SectionAggregate prints grouping and aggregate scalar links for aggregate operators. SectionAggregate Section = "aggregate" // SectionTyped prints all typed scalar links as a raw debug dump. SectionTyped Section = "typed" // SectionFull prints all scalar links, including unnamed links, as a raw debug dump. SectionFull Section = "full" )
func ParseSection ¶
ParseSection parses one print-section name. Valid values are "predicates", "ordering", "aggregate", "typed", and "full" (case-insensitive).
type Sections ¶
type Sections []Section
Sections is an ordered list of appendix sections.
func ParseSections ¶
ParseSections parses a named preset or a comma-separated print-section list. Empty or blank input returns a non-nil empty list, which renders no appendix sections.