INNER CODE UNIT · Go

Failf

rancher/system-upgrade-controller · e2e/framework/logging.go:29

func Failf(format string, args ...interface{}) {
	FailfWithOffset(1, format, args...)
}

// FailfWithOffset calls "Fail" and logs the error at "offset" levels above its caller
// (for example, for call chain f -> g -> FailfWithOffset(1, ...) error would be logged for "f").
func FailfWithOffset(offset int, format string, args ...interface{}) {
	msg := fmt.Sprintf(format, args...)
	Logf("FAIL", msg)
	framework.Fail(nowStamp()+": "+msg, 1+offset)
}

func nowStamp() string {
	return time.Now().Format(time.StampMilli)
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…