revert isEqualSet to private
This commit is contained in:
parent
59031c645e
commit
7311b5cdd1
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue