|
@@ -76,8 +76,9 @@ func TestLoadYAML(t *testing.T) {
|
|
|
func TestLoadYAMLMap(t *testing.T) {
|
|
|
retObjectMaps := make([]map[string]any, 0)
|
|
|
|
|
|
- err := LoadYamlMapFile("test.yaml", func(objectMap map[string]any) {
|
|
|
+ err := LoadYamlMapFile("test.yaml", func(objectMap map[string]any) error {
|
|
|
retObjectMaps = append(retObjectMaps, objectMap)
|
|
|
+ return nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
@@ -98,8 +99,9 @@ func TestLoadYAMLMap(t *testing.T) {
|
|
|
t.Fatal(err)
|
|
|
}
|
|
|
|
|
|
- err = LoadYamlMapBytes(yamlFileBytes, func(objectMap map[string]any) {
|
|
|
+ err = LoadYamlMapBytes(yamlFileBytes, func(objectMap map[string]any) error {
|
|
|
retObjectMaps = append(retObjectMaps, objectMap)
|
|
|
+ return nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|