revert isEqualSet to private

This commit is contained in:
nilvng 2025-02-01 11:30:25 +11:00
parent 59031c645e
commit 7311b5cdd1
2 changed files with 3 additions and 3 deletions

View file

@ -548,7 +548,7 @@ func (m *mockFinder) Find(opts FindOptions) (*api.PullRequest, ghrepo.Interface,
if m.expectSelector != opts.Selector {
return nil, nil, fmt.Errorf("mockFinder: expected selector %q, got %q", m.expectSelector, opts.Selector)
}
if len(m.expectFields) > 0 && !IsEqualSet(m.expectFields, opts.Fields) {
if len(m.expectFields) > 0 && !isEqualSet(m.expectFields, opts.Fields) {
return nil, nil, fmt.Errorf("mockFinder: expected fields %v, got %v", m.expectFields, opts.Fields)
}
if m.called {
@ -568,7 +568,7 @@ func (m *mockFinder) ExpectFields(fields []string) {
m.expectFields = fields
}
func IsEqualSet(a, b []string) bool {
func isEqualSet(a, b []string) bool {
if len(a) != len(b) {
return false
}

View file

@ -183,7 +183,7 @@ func (m *mockLister) List(opt ListOptions) (*api.PullRequestAndTotalCount, error
if m.expectFields != nil {
if !IsEqualSet(m.expectFields, opt.Fields) {
if !isEqualSet(m.expectFields, opt.Fields) {
return nil, fmt.Errorf("unexpected fields: %v", opt.Fields)
}
}