数组去重
(arr []string)
| 256 | |
| 257 | // 数组去重 |
| 258 | func UniqueArr(arr []string) []string { |
| 259 | newArr := make([]string, 0) |
| 260 | tempArr := make(map[string]bool, len(newArr)) |
| 261 | for _, v := range arr { |
| 262 | if tempArr[v] == false { |
| 263 | tempArr[v] = true |
| 264 | newArr = append(newArr, v) |
| 265 | } |
| 266 | } |
| 267 | return newArr |
| 268 | } |
| 269 | |
| 270 | func GetDomains(lis []mode.Link) []string { |
| 271 | var urls []string |
no outgoing calls
no test coverage detected