INNER CODE UNIT · Go

verifyFile

kubernetes/kubeadm · kinder/hack/verify-boilerplate.go:133

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…