some updates
This commit is contained in:
18
parser/blocks/block_yaml.go
Normal file
18
parser/blocks/block_yaml.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"go.yaml.in/yaml/v4"
|
||||
)
|
||||
|
||||
func (b TemplateBlock) ParseYamlBlock(input string) (key string, value any, error error) {
|
||||
|
||||
res := make(map[string]any)
|
||||
err := yaml.Unmarshal([]byte(input), &res)
|
||||
if err != nil {
|
||||
return "", nil, fmt.Errorf("failed to parse yaml: %w", err)
|
||||
}
|
||||
|
||||
return "", nil, nil
|
||||
}
|
Reference in New Issue
Block a user