MCPcopy Create free account
hub / github.com/auth0/auth0-cli / readFileContent

Function readFileContent

internal/cli/quickstart_detect.go:407–418  ·  view source on GitHub ↗

10 MB.

(dir, name string)

Source from the content-addressed store, hash-verified

405const maxDetectionFileSize = 10 * 1024 * 1024 // 10 MB.
406
407func readFileContent(dir, name string) (string, bool) {
408 filePath := filepath.Join(dir, name)
409 info, err := os.Stat(filePath)
410 if err != nil || info.Size() > maxDetectionFileSize {
411 return "", false
412 }
413 data, err := os.ReadFile(filePath)
414 if err != nil {
415 return "", false
416 }
417 return string(data), true
418}
419
420// readPackageJSONDeps reads package.json and returns a set of all dependency names
421// (from both "dependencies" and "devDependencies").

Callers 3

DetectProjectFunction · 0.85
isVaporSwiftPackageFunction · 0.85

Calls

no outgoing calls

Tested by 1