1
0
Fork 0
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:
Kane York 2016-05-21 11:29:12 -07:00
parent ddedb404e1
commit 814f25ad53

View file

@ -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) {