Improved documentation
This commit is contained in:
parent
1703dcb60d
commit
022107d796
@ -25,7 +25,12 @@ users := ocean.New[User]()
|
|||||||
users.Set("1", &User{Name: "User 1"})
|
users.Set("1", &User{Name: "User 1"})
|
||||||
|
|
||||||
// Read from memory
|
// 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:
|
In a real project you would usually prefix your collections with a project or company name:
|
||||||
|
Loading…
Reference in New Issue
Block a user