mirror of
https://github.com/enix/x509-certificate-exporter.git
synced 2026-08-28 16:27:16 +00:00
16 lines
308 B
Go
16 lines
308 B
Go
package internal
|
|
|
|
func unique(data []*certificateRef) []*certificateRef {
|
|
output := []*certificateRef{}
|
|
seen := map[string]bool{}
|
|
|
|
for _, elem := range data {
|
|
if !seen[elem.path+elem.kubeSecretKey] {
|
|
seen[elem.path+elem.kubeSecretKey] = true
|
|
output = append(output, elem)
|
|
}
|
|
}
|
|
|
|
return output
|
|
}
|