Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
diskv
✓ github.com/peterbourgon/diskv
Creates a diskv store, writes a key-value pair, and reads it back.
package main
import (
"fmt"
"github.com/peterbourgon/diskv"
)
func main() {
d := diskv.New(diskv.Options{
BasePath: "my-dir",
Transform: func(s string) []string { return []string{} },
CacheSizeMax: 1024 * 1024,
})
d.Write("key", []byte("value"))
value, _ := d.Read("key")
fmt.Println(string(value))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
2.0.1+incompatiblelatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.