Get user from the index by key
(key string)
| 31 | |
| 32 | // Get user from the index by key |
| 33 | func (u *Users) Get(key string) (*User, bool) { |
| 34 | u.RLock() |
| 35 | user, found := u.inner[key] |
| 36 | u.RUnlock() |
| 37 | return user, found |
| 38 | } |
| 39 | |
| 40 | // Set a users into the list by specific key |
| 41 | func (u *Users) Set(key string, user *User) { |
no outgoing calls