Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Great work but documentation is restricted. #11

Open
hiqsociety opened this issue Mar 19, 2021 · 0 comments
Open

Great work but documentation is restricted. #11

hiqsociety opened this issue Mar 19, 2021 · 0 comments

Comments

@hiqsociety
Copy link

hiqsociety commented Mar 19, 2021

https://pkg.go.dev/github.com/timtadh/fs2/bptree?utm_source=godoc

The link is restricted. Possible to get it to work? Thx

to get range of item 100 - 1000, should i do like this or there's more efficient means to get 100-1000 items?

    //      var key, value []byte
    kvi, err := bpt.Find(k)
    if err != nil {  
            log.Fatal(err)
    }
    var i uint64
    var b [][]byte
    for key, value, err, kvi = kvi(); kvi != nil; key, value, err, kvi = kvi() {
            if i > 100 {
                     b[i] = value
            }
            if i == 1000 {
                  break;
            }
            i++

            // do stuff with the keys and values
            return value, err
    }
    if err != nil {
            log.Fatal(err)
    }
    return nil, err
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant