{"repo":"lucmq/go-shelve","free":true,"listed":false,"github":"https://github.com/lucmq/go-shelve","clone":"git clone https://github.com/lucmq/go-shelve.git","description":"A persistent, map-like object for the Go programming language. Supports customization.","language":"Go","stars":14,"topics":["database","go","golang","key-value","shelve"],"license":"MIT","category":"databases-storage","readme_excerpt":"Go-Shelve Go-Shelve is a dependencies-free Go package that provides a persistent, map-like object called Shelf . It lets you store and retrieve Go objects directly, with the serialization and storage handled automatically by the Shelf . Additionally, you can customize the underlying key-value storage and serialization Codec to better suit your application's needs. This project is inspired by the shelve module from the Python standard library and aims to provide a similar set of functionalities. Check the driver's directory for additional storage and Codec options. Installation To use this package in your Go project, you can install it using go get : Usage Here are some examples of how to use go-shelve : Basic The following example illustrates the usage of a Shelf with string keys and values. The Shelf type uses generics and can be instantiated with any Go type as a value and any comparable type for the key. Custom Database and Codec By default, a Shelf serializes data using the JSON format and stores it using sdb (for \"shelve-db\"), a simple key-value storage created for this project. This database should be suitable for a wide range of applications, but the driver's directory provides additional options for configuring a Shelf with other databases from the Go ecosystem. The example below shows how to customize a Shelf to use BoltDB for storage together with MessagePack for serialization: Readable files with diskv and JSON An interesting use case for Shelf is storing data in f","default_branch":null,"files":null,"tree":[],"storefront":"/r/lucmq","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lucmq/go-shelve/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}