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

Function isEqualSet

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

Source from the content-addressed store, hash-verified

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

Callers 2

FindMethod · 0.85
ListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected