Skip to content

Commit

Permalink
refactor: Move NoMoreHitsErr definition to a dedicated file
Browse files Browse the repository at this point in the history
  • Loading branch information
aseure committed Oct 11, 2017
1 parent 24943ea commit 6e3dff3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 7 additions & 0 deletions algoliasearch/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package algoliasearch

import "errors"

var (
NoMoreHitsErr error = errors.New("No more hits")
)
4 changes: 0 additions & 4 deletions algoliasearch/index_iterator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package algoliasearch

import "errors"

type indexIterator struct {
cursor string
index Index
Expand All @@ -11,8 +9,6 @@ type indexIterator struct {
pos int
}

var NoMoreHitsErr error = errors.New("No more hits")

// newIndexIterator instantiates a IndexIterator on the `index` and according
// to the given `params`. It is also trying to load the first page of results
// and return an error if something goes wrong.
Expand Down

0 comments on commit 6e3dff3

Please sign in to comment.