MCPcopy
hub / github.com/grafana/tempo / findYamlFiles

Function findYamlFiles

tools/chloggen/internal/chlog/entry.go:274–286  ·  view source on GitHub ↗

findYamlFiles finds all YAML files in the specified directory. It includes files with both .yaml and .yml extensions.

(dir string)

Source from the content-addressed store, hash-verified

272// findYamlFiles finds all YAML files in the specified directory.
273// It includes files with both .yaml and .yml extensions.
274func findYamlFiles(dir string) ([]string, error) {
275 yamlFiles, err := filepath.Glob(filepath.Join(dir, "*.yaml"))
276 if err != nil {
277 return nil, fmt.Errorf("failed to find YAML files in %s: %w", dir, err)
278 }
279
280 ymlFiles, err := filepath.Glob(filepath.Join(dir, "*.yml"))
281 if err != nil {
282 return nil, fmt.Errorf("failed to find YML files in %s: %w", dir, err)
283 }
284
285 return slices.Concat(yamlFiles, ymlFiles), nil
286}

Callers 5

ReadEntriesFunction · 0.85
DeleteEntriesFunction · 0.85

Calls 1

JoinMethod · 0.65

Tested by 3