MCPcopy Index your code
hub / github.com/cloudfoundry/cli / sortedUniqueArray

Function sortedUniqueArray

util/ui/ui_for_push.go:233–244  ·  view source on GitHub ↗
(ary1 []string, ary2 []string)

Source from the content-addressed store, hash-verified

231}
232
233func sortedUniqueArray(ary1 []string, ary2 []string) []string {
234 uniq := append([]string{}, ary1...)
235
236 for _, str := range ary2 {
237 if !existsIn(str, uniq) {
238 uniq = append(uniq, str)
239 }
240 }
241
242 sort.Strings(uniq)
243 return uniq
244}

Callers 2

displayDiffForStringsMethod · 0.85

Calls 1

existsInFunction · 0.85

Tested by

no test coverage detected