A Skiplist implementation in Go
To start using hash, install Go and run go get
:
$ go get -u github.com/arriqaaq/skiplist
This will retrieve the library.
package main
import (
"fmt"
"github.com/arriqaaq/skiplist"
)
func main() {
// Set (accepts any value)
val := "test_val"
n := skiplist.New()
n.Set("ec", val)
n.Set("dc", 123)
n.Set("ac", val)
// Get
node := n.Get("ec")
fmt.Println("value: ", node.Value())
// Delete
n.Delete("dc")
}
Supported commands
Set
Get
Delete