fix: most of the template blocks
This commit is contained in:
@@ -18,11 +18,11 @@ type yamlBlock struct {
|
||||
}
|
||||
|
||||
type yamlField struct {
|
||||
Path string `yaml:"path"`
|
||||
Value any `yaml:"value,omitempty"`
|
||||
Codec string `yaml:"codec"`
|
||||
Hidden bool `yaml:"hidden,omitempty"`
|
||||
PathAlias []string `yaml:"pathAlias,omitempty"`
|
||||
Path string `yaml:"path"`
|
||||
Value any `yaml:"value,omitempty"`
|
||||
Codec string `yaml:"codec"`
|
||||
Hidden bool `yaml:"hidden,omitempty"`
|
||||
PathAlias string `yaml:"pathAlias,omitempty"`
|
||||
}
|
||||
|
||||
func parseYamlTemplate(input Slice) (block Block, err error) {
|
||||
@@ -34,7 +34,7 @@ func parseYamlTemplate(input Slice) (block Block, err error) {
|
||||
dec.KnownFields(true)
|
||||
|
||||
if err := dec.Decode(&blk); err != nil {
|
||||
return block, NewErrorf("content '%q' -> %w", cleaned, err).WithPosition(input.start, input.end)
|
||||
return block, NewErrorf("failed to parse yaml -> %w", err).WithPosition(input.start, input.end)
|
||||
}
|
||||
|
||||
if blk.Path == "" {
|
||||
|
Reference in New Issue
Block a user