From 022107d79656f82d0cf469ba96a7f7664333c58d Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 6 Jul 2023 15:15:51 +0200 Subject: [PATCH] Improved documentation --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de3e34b..986c40e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,12 @@ users := ocean.New[User]() users.Set("1", &User{Name: "User 1"}) // Read from memory -user, err := users.Get("1") +firstUser, err := users.Get("1") + +// Iterate over all users +for user := range users.All() { + fmt.Println(user.Name) +} ``` In a real project you would usually prefix your collections with a project or company name: