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

Commit 3718068

Browse files
author
whosonfirst
committed
update docs
1 parent 4f28df1 commit 3718068

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,40 @@
22

33
Go package implementing go-whosonfirst-iterate/emitter functionality for (Who's On First specific) SQLite databases.
44

5-
## Important
5+
## Documentation
66

7-
Documentation for this package is incomplete and will be updated shortly.
7+
[![Go Reference](https://pkg.go.dev/badge/github.com/whosonfirst/go-whosonfirst-iterate-sqlite.svg)](https://pkg.go.dev/github.com/whosonfirst/go-whosonfirst-iterate-sqlite)
8+
9+
## Example
10+
11+
```
12+
import (
13+
"context"
14+
"fmt"
15+
"github.com/whosonfirst/go-whosonfirst-iterate/v2/iterator"
16+
_ "github.com/whosonfirst/go-whosonfirst-iterate-sqlite/v2"
17+
"io"
18+
)
19+
20+
func main() {
21+
22+
ctx := context.Background()
23+
24+
iter_cb := func(ctx context.Context, path string, r io.ReadSeeker, args ...interface{}) error {
25+
fmt.Println(path)
26+
return nil
27+
}
28+
29+
iter, _ := iterator.NewIterator(ctx, "sqlite://", iter_cb)
30+
31+
iter.IterateURIs(ctx, "whosonfirst.db")
32+
}
33+
```
834

935
## Tools
1036

1137
```
12-
> make cli
38+
$> make cli
1339
go build -mod vendor -o bin/count cmd/count/main.go
1440
go build -mod vendor -o bin/emit cmd/emit/main.go
1541
```

0 commit comments

Comments
 (0)