mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Make slice on creation
This commit is contained in:
parent
0d3a6e1c37
commit
63bba0661f
|
|
@ -41,11 +41,10 @@ var allowedPresence = map[string]bool{
|
|||
"offline": true,
|
||||
"unavailable": true,
|
||||
}
|
||||
var allowedStrings []string
|
||||
var allowedStrings = make([]string, len(allowedPresence))
|
||||
|
||||
// we only need to do this once
|
||||
func init() {
|
||||
allowedStrings = make([]string, len(allowedPresence))
|
||||
i := 0
|
||||
for k := range allowedPresence {
|
||||
allowedStrings[i] = k
|
||||
|
|
|
|||
Loading…
Reference in a new issue