in scripts/lint_prowjobs/main.go [225:239]
func unmarshalYamlFile(filePath string, data interface{}) string {
fileContents, fileReadError := os.ReadFile(filePath)
if fileReadError != nil {
log.Fatalf("Error reading contents of %s: %v", filePath, fileReadError)
}
unmarshalError := yaml.Unmarshal(fileContents, data)
if unmarshalError != nil {
log.Fatalf("Error unmarshaling contents of %s: %v", filePath, unmarshalError)
}
return string(fileContents)
}