features

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnrecognizedQuoteStyle = errors.New("unrecognized quote style")
View Source
var ErrUnrecognizedSequenceStyle = errors.New("unrecognized sequence style")

Functions

func Check

func Check(n yaml.Node) error

Types

type QuoteStyle added in v0.21.0

type QuoteStyle string
const (
	SingleQuoteStyle QuoteStyle = "single"
	DoubleQuoteStyle QuoteStyle = "double"
)

type SequenceStyle

type SequenceStyle string
const (
	SequenceStyleBlock SequenceStyle = "block"
	SequenceStyleFlow  SequenceStyle = "flow"
)

type YAMLFeatureFunc

type YAMLFeatureFunc func(yaml.Node) error

These features will directly use the `yaml.Node` type and as such are specific to this formatter.

func FeatureForceQuoteStyle added in v0.21.0

func FeatureForceQuoteStyle(style QuoteStyle) (YAMLFeatureFunc, error)

func FeatureForceSequenceStyle

func FeatureForceSequenceStyle(style SequenceStyle) (YAMLFeatureFunc, error)

type YAMLFeatureList

type YAMLFeatureList []YAMLFeatureFunc

func (YAMLFeatureList) ApplyFeatures

func (y YAMLFeatureList) ApplyFeatures(node yaml.Node) error

Jump to

Keyboard shortcuts

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