Improved documentation

This commit is contained in:
Eduard Urbach 2023-07-06 14:31:23 +02:00
parent c62306bdf7
commit 35c039d01b
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -5,8 +5,14 @@ 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. If you like, you can operate on your entire data with classic UNIX tools.
```go ```go
type User struct {
Name string
}
// Data saved to ~/.ocean/User/ // Data saved to ~/.ocean/User/
users := ocean.New("User") users := ocean.New[User]("User")
// Store key and value in memory and write ~/.ocean/User/1.json
users.Set("1", &User{Name: "User 1"}) users.Set("1", &User{Name: "User 1"})
``` ```