func topClusters(clusters []*Cluster, count int) []*Cluster {
	less := func(i, j int) bool { return clusters[i].totalBuilds > clusters[j].totalBuilds }
	sort.SliceStable(clusters, less)

	if len(clusters) < count {
		count = len(clusters)
	}
	return clusters[0:count]
}
func topClusters(clusters []*Cluster, count int) []*Cluster {
	less := func(i, j int) bool { return clusters[i].totalBuilds > clusters[j].totalBuilds }
	sort.SliceStable(clusters, less)

	if len(clusters) < count {
		count = len(clusters)
	}
	return clusters[0:count]
}
func topClusters ( clusters [ ] * Cluster , count int ) [ ] * Cluster { less := func ( i , j int ) bool { return clusters [ i ] . totalBuilds > clusters [ j ] . totalBuilds } sort . SliceStable ( clusters , less ) if len ( clusters ) < count { count = len ( clusters ) } return clusters [ 0 : count ] }
// topClusters gets the 'count' most important clusters from a slice of clusters based on number of build failures.
topClusters gets the count most important clusters from a slice of clusters based on number of build failures .