Accepted codestyle suggestion.

This commit is contained in:
Patrick Connolly
2018-10-24 01:32:50 +08:00
parent 25dc18518e
commit 7705aa2a3b

View File

@@ -68,8 +68,7 @@ func (b *Bslack) populateUsers() {
for i, _ := range users { for i, _ := range users {
// Use array index for pointer, not the copy // Use array index for pointer, not the copy
// See: https://stackoverflow.com/a/29498133/504018 // See: https://stackoverflow.com/a/29498133/504018
u := &users[i] newUsers[users[i].ID] = &users[i]
newUsers[u.ID] = u
} }
b.usersMutex.Lock() b.usersMutex.Lock()