errStrings=append(errStrings,fmt.Sprintf("Error: Pod %s (host: %s) : Container w/ name %s status was bad (%v).",pod.Name,pod.Spec.Host,status.Name,errormsg))
ifstate,ok=states[status.ContainerID];!ok{
state=ContainerFailures{}
}
state.restarts=status.RestartCount
states[status.ContainerID]=state
}
}
}
}
}
}
iflen(errStrings)>0{
returnstates
returnfmt.Errorf(strings.Join(errStrings,"\n"))
}
returnnil
}
}
// Prints the histogram of the events and returns the number of bad events.
// Prints the histogram of the events and returns the number of bad events.