steveyen / gkvlite

Simple, ordered, key-value persistence library for the Go Language
MIT License
264 stars 27 forks source link

Compiling example program #2

Closed gnewton closed 10 years ago

gnewton commented 11 years ago

Hello,

I tried compiling the example program and got this error:

./g.go:31: cannot use func literal (type func(*gkvlite.Item) bool) as type bool in function argument ./g.go:31: not enough arguments in call to c.VisitItemsAscend ./g.go:48: undefined: bytes

I think the example program is out-of-sync with the present release. The source for Collection.go indicates a different number of arguments than in the example: func (t *Collection) VisitItemsAscend(target []byte, withValue bool, v ItemVisitor)

3 arguments

example: c.VisitItemsAscend([]byte("ford"), func(i *gkvlite.Item) bool { 2 arguments

Any chance you could update the example program, if I am correct? :-)

Oh, I am running on Fedora 18, go 1.1 go version go1.1 linux/amd64

Thanks, Glen

steveyen commented 10 years ago

Thanks d2g for the patch. I should learn how to use github more as a collaborative tool rather than as just a simple git server in the cloud.