MCPcopy Create free account
hub / github.com/UiPath/uipathcli / removeDuplicates

Method removeDuplicates

commandline/autocomplete_handler.go:199–210  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

197}
198
199func (a autoCompleteHandler) removeDuplicates(values []string) []string {
200 keys := make(map[string]bool)
201 result := []string{}
202
203 for _, entry := range values {
204 if _, value := keys[entry]; !value {
205 keys[entry] = true
206 result = append(result, entry)
207 }
208 }
209 return result
210}
211
212func (a autoCompleteHandler) removeExcluded(values []string, exclude []string) []string {
213 result := []string{}

Callers 2

searchCommandsMethod · 0.95
searchFlagsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected