MCPcopy
hub / github.com/cli/cli / Equal

Method Equal

pkg/set/string_set.go:72–84  ·  view source on GitHub ↗
(s2 *stringSet)

Source from the content-addressed store, hash-verified

70}
71
72func (s1 *stringSet) Equal(s2 *stringSet) bool {
73 if s1.Len() != s2.Len() {
74 return false
75 }
76 isEqual := true
77 for _, v := range s1.v {
78 if !s2.Contains(v) {
79 isEqual = false
80 break
81 }
82 }
83 return isEqual
84}

Callers 15

TestIsURLFunction · 0.80
TestParseURLFunction · 0.80
TestClientCommandFunction · 0.80
TestClientRemotesFunction · 0.80
TestParseRemotesFunction · 0.80
TestClientCurrentBranchFunction · 0.80
TestClientShowRefsFunction · 0.80
TestClientConfigFunction · 0.80

Implementers 1

stringSetpkg/set/string_set.go

Calls 3

LenMethod · 0.95
ContainsMethod · 0.80
LenMethod · 0.65

Tested by 15

TestIsURLFunction · 0.64
TestParseURLFunction · 0.64
TestClientCommandFunction · 0.64
TestClientRemotesFunction · 0.64
TestParseRemotesFunction · 0.64
TestClientCurrentBranchFunction · 0.64
TestClientShowRefsFunction · 0.64
TestClientConfigFunction · 0.64