(filePath string)
| 1067 | } |
| 1068 | |
| 1069 | func ReadYAMLFileStrMap(filePath string) (map[string]interface{}, error) { |
| 1070 | parsed, err := ReadYAMLFile(filePath) |
| 1071 | if err != nil { |
| 1072 | return nil, err |
| 1073 | } |
| 1074 | casted, ok := cast.InterfaceToStrInterfaceMap(parsed) |
| 1075 | if !ok { |
| 1076 | return nil, ErrorInvalidPrimitiveType(parsed, PrimTypeMap) |
| 1077 | } |
| 1078 | return casted, nil |
| 1079 | } |
| 1080 | |
| 1081 | func ReadYAMLBytes(yamlBytes []byte) (interface{}, error) { |
| 1082 | if len(yamlBytes) == 0 { |
nothing calls this directly
no test coverage detected