Skip to content
Snippets Groups Projects
Commit 777ffd48 authored by ensiouel's avatar ensiouel
Browse files

refactor: убрана проверка Cache на nil

parent 78ea8933
No related branches found
No related tags found
No related merge requests found
......@@ -13,9 +13,6 @@ type metricsMiddleware struct {
// MetricsMiddleware возвращает обертку над кэшем, которая используется для отслеживания количества хитов и промахов в кэше.
func MetricsMiddleware(cache Cache, cacheMetrics *metrics.CacheMetrics, serviceName string) Cache {
if cache == nil {
panic("cannot wrap metrics in cache, cache is nil")
}
return &metricsMiddleware{
cache: cache,
cacheMetrics: cacheMetrics,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment