mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-13 21:02:44 +08:00
16 lines
272 B
Go
16 lines
272 B
Go
package Common
|
|
|
|
func RemoveDuplicate(old []string) []string {
|
|
temp := make(map[string]struct{})
|
|
var result []string
|
|
|
|
for _, item := range old {
|
|
if _, exists := temp[item]; !exists {
|
|
temp[item] = struct{}{}
|
|
result = append(result, item)
|
|
}
|
|
}
|
|
|
|
return result
|
|
}
|