Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dcsunset/mysql-kv-wrapper

A wrapper for KV operation in MySQL
https://github.com/dcsunset/mysql-kv-wrapper

Last synced: 3 days ago
JSON representation

A wrapper for KV operation in MySQL

Awesome Lists containing this project

README

        

# mysql-kv-wrapper

## Installation

```
go get github.com/DCsunset/mysql-kv-wrapper
```

## Examples

```go
package main

import (
kvstore "github.com/DCsunset/mysql-kv-wrapper"
)

func main() {
var store kvstore.KVStore
err := store.Open("root:password@/")
if err != nil {
panic(err)
}
defer store.Close()

err = store.Write("hello", "world")
if err != nil {
panic(err)
}
value, err := store.Read("hello")
if value != "world" {
panic("Wrong value")
}
}
```