detect if the string is yamlMap
(data string)
| 110 | |
| 111 | // detect if the string is yamlMap |
| 112 | func 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 | |
| 120 | func IsFile(ctx context.Context, path string) (bool, error) { |
| 121 | fs := FS(ctx) |
no outgoing calls