Improved documentation

This commit is contained in:
Eduard Urbach 2023-07-06 14:48:29 +02:00
parent f769092c16
commit af35cde2d8
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -4,13 +4,15 @@ In-memory key value store that saves your data to plain old JSON files.
If you like, you can operate on your entire data with classic UNIX tools.
Suitable for small to medium data volume.
## Installation
```shell
go get git.akyoto.dev/go/ocean
```
## Examples
## Example
```go
// User data
@ -23,6 +25,9 @@ users := ocean.New[User]("User")
// Store key and value in memory and write ~/.ocean/User/1.json
users.Set("1", &User{Name: "User 1"})
// Read value from memory
user, err := users.Get("1")
```
In a real project you would usually prefix your collections with a project or company name: