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

disco

package
v1.5.49 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package disco provides a pipeline for disco-balling Matter spec docs

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = DiscoOptions{
	LinkIndexTables:               false,
	AddMissingColumns:             true,
	ReorderColumns:                true,
	RenameTableHeaders:            true,
	FormatAccess:                  true,
	PromoteDataTypes:              true,
	ReorderSections:               true,
	NormalizeTableOptions:         true,
	FixCommandDirection:           true,
	AppendSubsectionTypes:         true,
	UppercaseHex:                  true,
	AddSpaceAfterPunctuation:      true,
	RemoveExtraSpaces:             true,
	NormalizeFeatureNames:         true,
	DisambiguateConformanceChoice: true,
	NormalizeAnchors:              false,
	RemoveMandatoryFallbacks:      true,
	RenameSections:                false,
}
View Source
var ErrEmptyDoc = fmt.Errorf("missing top level section")

Functions

func Pipeline

func Pipeline(cxt context.Context, parserOptions spec.ParserOptions, docPaths []string, pipelineOptions pipeline.ProcessingOptions, discoOptions DiscoOptions, attributes []asciidoc.AttributeName, renderOptions []render.Option, writer files.Writer[string]) (err error)

Types

type AnchorNormalizer

type AnchorNormalizer struct {
	// contains filtered or unexported fields
}

func (AnchorNormalizer) Name

func (r AnchorNormalizer) Name() string

func (AnchorNormalizer) Process

func (p AnchorNormalizer) Process(cxt context.Context, inputs []*pipeline.Data[*spec.Doc]) (outputs []*pipeline.Data[render.InputDocument], err error)

type Baller

type Baller struct {
	// contains filtered or unexported fields
}

func NewBaller

func NewBaller(discoOptions DiscoOptions) *Baller

func (Baller) Name

func (r Baller) Name() string

func (Baller) Process

func (r Baller) Process(cxt context.Context, input *pipeline.Data[*spec.Doc], index int32, total int32) (outputs []*pipeline.Data[*spec.Doc], extras []*pipeline.Data[*spec.Doc], err error)

type DataTypeEntry

type DataTypeEntry struct {
	// contains filtered or unexported fields
}

type DiscoOptions

type DiscoOptions struct {
	LinkIndexTables               bool `default:"false" aliases:"linkIndexTables" help:"link index tables to child sections" group:"Discoballing:"`
	AddMissingColumns             bool `default:"true" aliases:"addMissingColumns" help:"add standard columns missing from tables" group:"Discoballing:"`
	ReorderColumns                bool `default:"true" aliases:"reorderColumns" help:"rearrange table columns into disco-ball order" group:"Discoballing:"`
	RenameTableHeaders            bool `default:"true" aliases:"renameTableHeaders" help:"rename table headers to disco-ball standard names" group:"Discoballing:"`
	FormatAccess                  bool `default:"true" aliases:"formatAccess" help:"reformat access columns in disco-ball order" group:"Discoballing:"`
	PromoteDataTypes              bool `default:"true" aliases:"promoteDataTypes" help:"promote inline data types to Data Types section" group:"Discoballing:"`
	ReorderSections               bool `default:"true" aliases:"reorderSections" help:"reorder sections in disco-ball order" group:"Discoballing:"`
	NormalizeTableOptions         bool `` /* 150-byte string literal not displayed */
	FixCommandDirection           bool `default:"true" aliases:"fixCommandDirection" help:"normalize command directions" group:"Discoballing:"`
	AppendSubsectionTypes         bool `` /* 161-byte string literal not displayed */
	UppercaseHex                  bool `default:"true" aliases:"uppercaseHex" help:"uppercase hex values" group:"Discoballing:"`
	AddSpaceAfterPunctuation      bool `default:"true" aliases:"addSpaceAfterPunctuation" help:"add missing space after punctuation" group:"Discoballing:"`
	RemoveExtraSpaces             bool `default:"true" aliases:"removeExtraSpaces" help:"remove extraneous spaces" group:"Discoballing:"`
	NormalizeFeatureNames         bool `default:"true" aliases:"normalizeFeatureNames" help:"correct invalid feature names" group:"Discoballing:"`
	DisambiguateConformanceChoice bool `` /* 142-byte string literal not displayed */
	NormalizeAnchors              bool `default:"false" aliases:"normalizeAnchors" help:"rewrite anchors and references without labels" group:"Discoballing:"`
	RemoveMandatoryFallbacks      bool `default:"true" aliases:"removeMandatoryFallbacks" help:"remove fallback values for mandatory fields" group:"Discoballing:"`
	RenameSections                bool `default:"false" help:"rename sections to disco-ball standard names" group:"Discoballing:"`
}

type Option

type Option func(options *DiscoOptions)

Jump to

Keyboard shortcuts

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