func getClaimRefNamespace(pv *corev1.PersistentVolume) string { … } type Visitor … func skipEmptyNames(visitor Visitor) Visitor { … } // VisitPVSecretNames invokes the visitor function with the name of every secret // referenced by the PV spec. If visitor returns false, visiting is short-circuited. // Returns true if visiting completed, false if visiting was short-circuited. func VisitPVSecretNames(pv *corev1.PersistentVolume, visitor Visitor) bool { … }