mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-30 09:50: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 {
|
||||
if match == CacheTypePersistent {
|
||||
return PersistentCachingCommands
|
||||
} else if match == CacheTypeLastOnly {
|
||||
return HourlyCachingCommands
|
||||
} else {
|
||||
panic("unknown caching type")
|
||||
var ret []Command
|
||||
for cmd, info := range S2CCommandsCacheInfo {
|
||||
if info.Caching == match {
|
||||
ret = append(ret, cmd)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func HTTPBackendDropBacklog(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue