MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / cleanupResourceList

Function cleanupResourceList

pkg/specs/roles.go:367–372  ·  view source on GitHub ↗

cleanupResourceList returns a new list with the same elements as resourceList, where the empty and duplicate entries have been removed

(resourceList []string)

Source from the content-addressed store, hash-verified

365// cleanupResourceList returns a new list with the same elements as resourceList, where
366// the empty and duplicate entries have been removed
367func cleanupResourceList(resourceList []string) []string {
368 result := stringset.From(resourceList).ToSortedList()
369 return slices.DeleteFunc(result, func(s string) bool {
370 return len(s) == 0
371 })
372}
373
374func externalClusterSecrets(cluster *apiv1.Cluster) []string {
375 var result []string

Callers 2

getInvolvedSecretNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected