File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 4343 ErrExpectedInt = fmt .Errorf (
4444 "%w: expected int value" , ErrParse ,
4545 )
46+ // ErrExpectedScalarOrMap indicates that we did not find an expected
47+ // scalar or map field
48+ ErrExpectedScalarOrMap = fmt .Errorf (
49+ "%w: expected scalar or map field" , ErrParse ,
50+ )
4651 // ErrExpectedScalarOrSequence indicates that we did not find an expected
4752 // scalar or sequence of scalars field
4853 ErrExpectedScalarOrSequence = fmt .Errorf (
@@ -126,6 +131,15 @@ func ExpectedScalarOrSequenceAt(node *yaml.Node) error {
126131 )
127132}
128133
134+ // ExpectedScalarOrMapAt returns an ErrExpectedScalarOrMap error annotated with
135+ // the line/column of the supplied YAML node.
136+ func ExpectedScalarOrMapAt (node * yaml.Node ) error {
137+ return fmt .Errorf (
138+ "%w at line %d, column %d" ,
139+ ErrExpectedScalarOrMap , node .Line , node .Column ,
140+ )
141+ }
142+
129143// ExpectedTimeoutAt returns an ErrExpectedTimeout error annotated
130144// with the line/column of the supplied YAML node.
131145func ExpectedTimeoutAt (node * yaml.Node ) error {
You can’t perform that action at this time.
0 commit comments