INNER CODE UNIT · Go

len

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

	if idx < len(boilerPlate) {
		return errors.New("boilerplate has missing lines")
	}
	return nil
}

// verifyFile verifies if a file contains the boilerplate
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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…