INNER CODE UNIT · Go

verifyFile

kubernetes-sigs/kwok · hack/verify_boilerplate/main.go:131

func verifyFile(filePath string) error {
	if len(filePath) == 0 {
		return errors.New("empty file name")
	}

	if !isSupportedFileExtension(filePath) {
		fmt.Printf("skipping %q: unsupported file type\n", filePath)
		return nil
	}

	// read the file
	b, err := os.ReadFile(filePath)
	if err != nil {
		return err
	}

	return verifyBoilerplate(string(b))
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…