INNER CODE UNIT · Go

inputFiles

deckhouse/deckhouse · dhctl/hack/gen_preflight_checks/main.go:48

func inputFiles() []string {
	patterns := []string{
		filepath.Join("..", "..", "pkg/preflight/checks/*.go"),
	}
	files := make([]string, 0, len(patterns))
	for _, pattern := range patterns {
		matches, _ := filepath.Glob(pattern) // ignore glob errors
		files = append(files, matches...)
	}
	return files
}

func collectCheckNames(paths []string) []string {
	fset := token.NewFileSet()
	seen := make(map[string]struct{})

	for _, path := range paths {
		file, err := parser.ParseFile(fset, path, nil, 0)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…