(src ProxyList)
| 111 | } |
| 112 | |
| 113 | func Deduplication(src ProxyList) ProxyList { |
| 114 | result := make(ProxyList, 0, len(src)) |
| 115 | temp := map[string]struct{}{} |
| 116 | for _, item := range src { |
| 117 | if item != nil { |
| 118 | if _, ok := temp[item.Identifier()]; !ok { |
| 119 | temp[item.Identifier()] = struct{}{} |
| 120 | result = append(result, item) |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | return result |
| 125 | } |
| 126 | |
| 127 | func (ps ProxyList) Clone() ProxyList { |
| 128 | result := make(ProxyList, 0, len(ps)) |
nothing calls this directly
no test coverage detected