mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Fix SA5011 errors by making control flow abort obvious to linter
This commit is contained in:
parent
1fbf06f5ad
commit
04fadd8b03
@ -49,6 +49,7 @@ func Failf(format string, args ...interface{}) {
|
|||||||
skip := 2
|
skip := 2
|
||||||
log("FAIL", "%s\n\nFull Stack Trace\n%s", msg, PrunedStack(skip))
|
log("FAIL", "%s\n\nFull Stack Trace\n%s", msg, PrunedStack(skip))
|
||||||
e2eginkgowrapper.Fail(nowStamp()+": "+msg, skip)
|
e2eginkgowrapper.Fail(nowStamp()+": "+msg, skip)
|
||||||
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fail is a replacement for ginkgo.Fail which logs the problem as it occurs
|
// Fail is a replacement for ginkgo.Fail which logs the problem as it occurs
|
||||||
|
@ -118,6 +118,7 @@ func pruneStack(skip int) string {
|
|||||||
// Skipf skips with information about why the test is being skipped.
|
// Skipf skips with information about why the test is being skipped.
|
||||||
func Skipf(format string, args ...interface{}) {
|
func Skipf(format string, args ...interface{}) {
|
||||||
skipInternalf(1, format, args...)
|
skipInternalf(1, format, args...)
|
||||||
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
|
|
||||||
// SkipUnlessAtLeast skips if the value is less than the minValue.
|
// SkipUnlessAtLeast skips if the value is less than the minValue.
|
||||||
|
Loading…
Reference in New Issue
Block a user