feat: refactor some shit

This commit is contained in:
Max Richter
2025-08-17 00:46:45 +02:00
parent 43644c4f40
commit cc8f967f07
20 changed files with 459 additions and 209 deletions

View 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
}