mirror of
https://github.com/edoardottt/cariddi.git
synced 2026-09-28 20:44:57 +02:00
update
This commit is contained in:
@@ -327,3 +327,16 @@ func GetSecretRegexes() []Secret {
|
||||
}
|
||||
return regexes
|
||||
}
|
||||
|
||||
//RemoveDuplicateSecrets removes duplicates from secrets found
|
||||
func RemoveDuplicateSecrets(input []SecretMatched) []SecretMatched {
|
||||
keys := make(map[string]bool)
|
||||
list := []SecretMatched{}
|
||||
for _, entry := range input {
|
||||
if _, value := keys[entry.Url]; !value {
|
||||
keys[entry.Url] = true
|
||||
list = append(list, entry)
|
||||
}
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user