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

refactor(WithMetrics): добавлена проверка на nil для оборачиваемого кэша

parent 300c0516
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,9 @@ type metricsCache struct {
//
// Метрики записываются в prometheus.DefaultRegisterer
func WithMetrics(cache Cache, cacheID string) Cache {
if cache == nil {
panic("cannot wrap metrics in cache, cache is nil")
}
return &metricsCache{
cacheID: cacheID,
cache: cache,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment