Documentation
¶
Overview ¶
Package errorformatv4 provides the go-yaml v4 error formatter.
With no options, the v4 formatter renders the current structured go-yaml error style:
go-yaml load error in scanner at L2.C6: message go-yaml dump error in representer: message
It can also be configured with alternate load-error position styles.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option configures a Plugin.
func WithPositionStyle ¶
func WithPositionStyle(style PositionStyle) Option
WithPositionStyle sets how load-error positions are rendered.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements the v4 YAML error formatter.
func NewFromYAML ¶
NewFromYAML creates a v4 error formatting plugin from YAML config.
func (*Plugin) FormatDumpError ¶
FormatDumpError implements [yaml.ErrorFormatPlugin].
type PositionStyle ¶
type PositionStyle int
PositionStyle controls how load-error positions are rendered.
const ( // PositionShort renders positions as L2.C6. PositionShort PositionStyle = iota // PositionLong renders positions as line 2, column 6. PositionLong // PositionLine renders positions as line 2. PositionLine )