MCPcopy
hub / github.com/cortexlabs/cortex / MustReadYAMLStr

Function MustReadYAMLStr

pkg/lib/configreader/reader.go:1105–1111  ·  view source on GitHub ↗
(yamlStr string)

Source from the content-addressed store, hash-verified

1103}
1104
1105func MustReadYAMLStr(yamlStr string) interface{} {
1106 parsed, err := ReadYAMLBytes([]byte(yamlStr))
1107 if err != nil {
1108 exit.Panic(err)
1109 }
1110 return parsed
1111}
1112
1113func MustReadYAMLStrMap(yamlStr string) map[string]interface{} {
1114 parsed, err := ReadYAMLBytes([]byte(yamlStr))

Callers 8

TestSimpleFunction · 0.85
TestNestedFunction · 0.85
TestNestedListFunction · 0.85
TestInterfaceFunction · 0.85
TestInterfaceListFunction · 0.85
TestDefaultNullFunction · 0.85
TestDefaultFieldFunction · 0.85
TestFlattenAllStrValuesFunction · 0.85

Calls 2

PanicFunction · 0.92
ReadYAMLBytesFunction · 0.85

Tested by 8

TestSimpleFunction · 0.68
TestNestedFunction · 0.68
TestNestedListFunction · 0.68
TestInterfaceFunction · 0.68
TestInterfaceListFunction · 0.68
TestDefaultNullFunction · 0.68
TestDefaultFieldFunction · 0.68
TestFlattenAllStrValuesFunction · 0.68