MCPcopy Create free account
hub / github.com/conforma/cli / IsYamlMap

Function IsYamlMap

internal/utils/helpers.go:112–118  ·  view source on GitHub ↗

detect if the string is yamlMap

(data string)

Source from the content-addressed store, hash-verified

110
111// detect if the string is yamlMap
112func IsYamlMap(data string) bool {
113 if data == "" {
114 return false
115 }
116 var yamlMap map[string]interface{}
117 return yaml.Unmarshal([]byte(data), &yamlMap) == nil
118}
119
120func IsFile(ctx context.Context, path string) (bool, error) {
121 fs := FS(ctx)

Callers 2

detectInputFunction · 0.92
TestIsYamlMapFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsYamlMapFunction · 0.68