From 35c039d01b386d70e6c6fb57019de55d4dcdacd1 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 6 Jul 2023 14:31:23 +0200 Subject: [PATCH] Improved documentation --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7950214..df2db15 100644 --- a/README.md +++ b/README.md @@ -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. ```go +type User struct { + Name string +} + // 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"}) ```