updated vendor

This commit is contained in:
2026-06-16 08:02:19 +02:00
parent 2f7f99d3f0
commit 77299d0c64
1283 changed files with 67302 additions and 208958 deletions
+25
View File
@@ -0,0 +1,25 @@
// Copyright 2026 The go-yaml Project Contributors
// SPDX-License-Identifier: Apache-2.0
package yaml
// LimitPlugin configures safety limits for YAML parsing.
//
// When registered, CheckDepth is called on each nesting depth increase,
// and CheckAlias is called on each alias expansion to detect excessive
// aliasing.
//
// Example usage:
//
// import "go.yaml.in/yaml/v4/plugin/limit"
// loader := yaml.NewLoader(data, yaml.WithPlugin(limit.New(limit.AliasNone())))
type LimitPlugin interface {
// CheckDepth is called when the parser increases nesting depth.
// depth is the current nesting level; ctx.Kind is "flow" or "block".
// Return an error to abort parsing.
CheckDepth(depth int, ctx *DepthContext) error
// CheckAlias is called during alias expansion.
// Return an error to abort construction.
CheckAlias(aliasCount, constructCount int) error
}