mirror of
https://git.klmp200.net/ALFRED/ALFRED.git
synced 2025-05-24 12:51:16 +02:00
Added ListSubscriber, Unpublish and Retrieve commands
This commit is contained in:
parent
ef2866e89b
commit
ff91955361
2 changed files with 109 additions and 18 deletions
|
@ -61,6 +61,17 @@ func (u users) Set(username string, key, data string) {
|
|||
go uf.write()
|
||||
}
|
||||
|
||||
// Get all known usernames
|
||||
func (u users) GetUsernames() []string {
|
||||
u.mutex.Lock()
|
||||
defer u.mutex.Unlock()
|
||||
var usernames []string
|
||||
for username, _ := range u.data {
|
||||
usernames = append(usernames, username)
|
||||
}
|
||||
return usernames
|
||||
}
|
||||
|
||||
func (u usersFile) read() {
|
||||
u.mutex.Lock()
|
||||
defer u.mutex.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue