MCPcopy Index your code
hub / github.com/cortexlabs/cortex / ReadYAMLFileStrMap

Function ReadYAMLFileStrMap

pkg/lib/configreader/reader.go:1069–1079  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

1067}
1068
1069func 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
1081func ReadYAMLBytes(yamlBytes []byte) (interface{}, error) {
1082 if len(yamlBytes) == 0 {

Callers

nothing calls this directly

Calls 3

ReadYAMLFileFunction · 0.85

Tested by

no test coverage detected