MCPcopy Create free account
hub / github.com/cli/cli / isEqualSet

Function isEqualSet

pkg/cmd/pr/shared/finder.go:671–689  ·  view source on GitHub ↗
(a, b []string)

Source from the content-addressed store, hash-verified

669}
670
671func isEqualSet(a, b []string) bool {
672 if len(a) != len(b) {
673 return false
674 }
675
676 aCopy := make([]string, len(a))
677 copy(aCopy, a)
678 bCopy := make([]string, len(b))
679 copy(bCopy, b)
680 sort.Strings(aCopy)
681 sort.Strings(bCopy)
682
683 for i := range aCopy {
684 if aCopy[i] != bCopy[i] {
685 return false
686 }
687 }
688 return true
689}

Callers 2

FindMethod · 0.85
ListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected