MCPcopy Index your code
hub / github.com/XTLS/RealiTLScanner / RemoveDuplicateStr

Function RemoveDuplicateStr

utils.go:175–185  ·  view source on GitHub ↗
(strSlice []string)

Source from the content-addressed store, hash-verified

173 return arr[0], nil
174}
175func RemoveDuplicateStr(strSlice []string) []string {
176 allKeys := make(map[string]bool)
177 var list []string
178 for _, item := range strSlice {
179 if _, value := allKeys[item]; !value {
180 allKeys[item] = true
181 list = append(list, item)
182 }
183 }
184 return list
185}
186func OutWriter(writer io.Writer) chan<- string {
187 ch := make(chan string)
188 go func() {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected