Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
update SQLiteIndexerLoadRecordFunc signature to reflect whosonfirst/g…
Browse files Browse the repository at this point in the history
…o-whosonfirst-iterate/v2; bump to /v2
  • Loading branch information
thisisaaronland committed Oct 7, 2021
1 parent 27d34f4 commit 42def03
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/aaronland/go-sqlite/tables"
"github.com/whosonfirst/go-whosonfirst-iterate/v2/emitter"
"github.com/whosonfirst/go-whosonfirst-log"
"github.com/whosonfirst/go-whosonfirst-sqlite-index"
"github.com/whosonfirst/go-whosonfirst-sqlite-index/v2"
"io"
"os"
"strings"
Expand Down Expand Up @@ -71,7 +71,7 @@ func main() {

to_index = append(to_index, ex)

record_func := func(ctx context.Context, fh io.ReadSeeker, args ...interface{}) (interface{}, error) {
record_func := func(ctx context.Context, path string, fh io.ReadSeeker, args ...interface{}) (interface{}, error) {

now := time.Now()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/whosonfirst/go-whosonfirst-sqlite-index
module github.com/whosonfirst/go-whosonfirst-sqlite-index/v2

go 1.16

Expand Down
4 changes: 2 additions & 2 deletions index.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

type SQLiteIndexerPostIndexFunc func(context.Context, sqlite.Database, []sqlite.Table, interface{}) error

type SQLiteIndexerLoadRecordFunc func(context.Context, io.ReadSeeker, ...interface{}) (interface{}, error)
type SQLiteIndexerLoadRecordFunc func(context.Context, string, io.ReadSeeker, ...interface{}) (interface{}, error)

type SQLiteIndexer struct {
callback emitter.EmitterCallbackFunc
Expand Down Expand Up @@ -44,7 +44,7 @@ func NewSQLiteIndexer(opts *SQLiteIndexerOptions) (*SQLiteIndexer, error) {

emitter_cb := func(ctx context.Context, path string, fh io.ReadSeeker, args ...interface{}) error {

record, err := record_func(ctx, fh, args...)
record, err := record_func(ctx, path, fh, args...)

if err != nil {
logger.Warning("failed to load record (%s) because %s", path, err)
Expand Down

0 comments on commit 42def03

Please sign in to comment.