INNER CODE UNIT · Go

printBool

airwallex/k8s-pod-restart-info-collector · helpers.go:342

func printBool(value bool) string {
	if value {
		return "True"
	}

	return "False"
}

// byFirstTimestamp sorts a slice of events by first timestamp, using their involvedObject's name as a tie breaker.
type byLastTimestamp []v1.Event

func (o byLastTimestamp) Len() int      { return len(o) }
func (o byLastTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] }

func (o byLastTimestamp) Less(i, j int) bool {
	if o[i].LastTimestamp.Equal(&o[j].LastTimestamp) {
		return o[i].InvolvedObject.Name < o[j].InvolvedObject.Name
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…