Upgrade go-yaml to v4.0.0
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
"go.yaml.in/yaml/v4/plugin/limit"
|
||||
"go.yaml.in/yaml/v4/plugin/loaderlimits"
|
||||
|
||||
"go.maximumdirect.net/configkit/internal/document"
|
||||
)
|
||||
@@ -60,7 +60,7 @@ func Parse(input io.Reader, sourceID string, limits Limits) (*document.Node, []I
|
||||
parserDepth = limits.Depth + 2
|
||||
}
|
||||
depthExceeded := false
|
||||
plugin := limit.New(limit.DepthFunc(func(depth int, _ *limit.DepthContext) error {
|
||||
plugin := loaderlimits.New(loaderlimits.DepthFunc(func(depth int, _ *loaderlimits.DepthContext) error {
|
||||
if depth > parserDepth {
|
||||
depthExceeded = true
|
||||
return errParserDepth
|
||||
|
||||
Reference in New Issue
Block a user