so much work to do :c

This commit is contained in:
gitGnome
2026-04-05 22:38:02 +02:00
parent 7f54cc7a40
commit 9b57157769
6 changed files with 41 additions and 58 deletions
+1 -9
View File
@@ -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()