(yamlStr string)
| 1111 | } |
| 1112 | |
| 1113 | func MustReadYAMLStrMap(yamlStr string) map[string]interface{} { |
| 1114 | parsed, err := ReadYAMLBytes([]byte(yamlStr)) |
| 1115 | if err != nil { |
| 1116 | exit.Panic(err) |
| 1117 | } |
| 1118 | casted, ok := cast.InterfaceToStrInterfaceMap(parsed) |
| 1119 | if !ok { |
| 1120 | exit.Panic(ErrorInvalidPrimitiveType(parsed, PrimTypeMap)) |
| 1121 | } |
| 1122 | return casted |
| 1123 | } |
| 1124 | |
| 1125 | func MustReadJSONStr(jsonStr string) interface{} { |
| 1126 | parsed, err := ReadJSONBytes([]byte(jsonStr)) |
nothing calls this directly
no test coverage detected