Merge pull request #109256 from chendave/nullpointer
Fix the nil pointer dereference for comformance spec validation
This commit is contained in:
commit
a1a9dc066c
@ -108,13 +108,12 @@ func main() {
|
|||||||
testInfo := getTestInfo(spec)
|
testInfo := getTestInfo(spec)
|
||||||
if testInfo != nil {
|
if testInfo != nil {
|
||||||
testInfos = append(testInfos, testInfo)
|
testInfos = append(testInfos, testInfo)
|
||||||
}
|
|
||||||
|
|
||||||
if err := validateTestName(testInfo.CodeName); err != nil {
|
if err := validateTestName(testInfo.CodeName); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sort.Slice(testInfos, func(i, j int) bool { return testInfos[i].CodeName < testInfos[j].CodeName })
|
sort.Slice(testInfos, func(i, j int) bool { return testInfos[i].CodeName < testInfos[j].CodeName })
|
||||||
saveAllTestInfo(testInfos)
|
saveAllTestInfo(testInfos)
|
||||||
|
Loading…
Reference in New Issue
Block a user