🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

github.com/jba/btree

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
b

github.com/jba/btree

v0.0.0-20180328140309-d4edd57f39b8
Version published
Created

BTree implementation for Go

Travis CI Build Status

This package provides an in-memory B-Tree implementation for Go, useful as an ordered, mutable data structure.

This is a fork of github.com/google/btree with an improved API:

  • Separate keys and values. With the single type Item it could be awkward to construct an item solely for use as a key.

  • Instead of eight separate methods for iterating, two methods, After and Before, return a Cursor that can be used to iterate in either direction:

    c := t.Before(k)
    for c.Next() {
        // First key will be k, if it's present.
        fmt.Println(c.Key, c.Value)
    }
    

FAQs

Package last updated on 28 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts