mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-31 10:20:55 +00:00
tests: Don't hardcode GetCommandsOfType
This commit is contained in:
parent
ddedb404e1
commit
814f25ad53
1 changed files with 6 additions and 6 deletions
|
@ -195,13 +195,13 @@ func SaveLastMessage(which map[Command]map[string]LastSavedMessage, locker sync.
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetCommandsOfType(match BacklogCacheType) []Command {
|
func GetCommandsOfType(match BacklogCacheType) []Command {
|
||||||
if match == CacheTypePersistent {
|
var ret []Command
|
||||||
return PersistentCachingCommands
|
for cmd, info := range S2CCommandsCacheInfo {
|
||||||
} else if match == CacheTypeLastOnly {
|
if info.Caching == match {
|
||||||
return HourlyCachingCommands
|
ret = append(ret, cmd)
|
||||||
} else {
|
}
|
||||||
panic("unknown caching type")
|
|
||||||
}
|
}
|
||||||
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
func HTTPBackendDropBacklog(w http.ResponseWriter, r *http.Request) {
|
func HTTPBackendDropBacklog(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue