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: