INNER CODE UNIT · Go
logWithPrefix
kubernetes/dns · cmd/sidecar-e2e/main.go:92
func logWithPrefix(prefix string, str string) {
lines := strings.Split(str, "\n")
for _, line := range lines {
log.Printf("%v | %v", prefix, line)
}
}
func waitForPredicate(predicate func() (bool, error), duration time.Duration, interval time.Duration) error {
var err error
start := time.Now()
for time.Since(start) < duration {
var stop bool
stop, err = predicate()
if stop {
return err
}