so much work to do :c
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
CacheUsers = make(map[uint32]*User)
|
||||
mu sync.RWMutex
|
||||
CacheUsers = make(map[uint32]*User)
|
||||
Groups = make(map[uint32]*Group)
|
||||
)
|
||||
|
||||
@@ -22,14 +22,6 @@ func CacheGetUserById(id uint32) (*User, error) {
|
||||
return user, nil
|
||||
}
|
||||
|
||||
func CacheGetIdByName(name string) (uint32, error) {
|
||||
user, err := CacheGetUserByName(name)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return user.Id, nil
|
||||
}
|
||||
|
||||
func CacheGetUserByName(name string) (*User, error) {
|
||||
mu.RLock()
|
||||
defer mu.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user