Skip to content

racecarparts/ezbunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ezbunt

ezbunt is a Go module for conveniently interacting with a buntdb. Functions include: creating a data file, storing simple data types, and complex types as JSON objects.

Documentation

godoc.org/github.com/racecarparts/ezbunt

Usage

via: go.mod (go module):

require (
    ...
    github.com/racecarparts/ezbunt v0.1.2
)

or via: go get

$ go get -u github.com/racecarparts/ezbunt

Example

package main

import (
    "fmt"
    ez "github.com/racecarparts/ezbunt"
)

func main() {
    ez := ez.New("data.file")
    ez.WriteKeyVal("my:1234", "sharona")

    pairs, err := ez.GetPairs("my")
    if err != nil {
        fmt.Println(err)
    }
    fmt.Println(pairs)

    val, err := ez.GetVal("my:1234")
    if err != nil {
        fmt.Println(err)
    }
    fmt.Println(val)
}

About

Convenience functions for buntdb

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages