fixed some errors from linter

This commit is contained in:
a.pivkin
2025-12-23 06:49:59 +03:00
parent 20a59dceae
commit 54ce83f458
4 changed files with 14 additions and 20 deletions
+3 -7
View File
@@ -1,8 +1,7 @@
package metrics
import (
"fmt"
"rbd_exporter/RBDFactory"
"rbd_exporter/rbdfactory"
"rbd_exporter/mytypes"
"rbd_exporter/logger"
"time"
@@ -11,7 +10,6 @@ import (
func GetMetrics(cephConn mytypes.CephConnector) {
metrics := InitMetrics()
prometheus.MustRegister(
metrics.Total_rbd_requested_size_per_pool,
@@ -30,7 +28,7 @@ func GetMetrics(cephConn mytypes.CephConnector) {
}
for _, v := range poolList {
x, _ := RBDFactory.PoolFactory(cephConn, v)
x, _ := rbdfactory.PoolFactory(cephConn, v)
result = append(result, x)
}
@@ -39,9 +37,8 @@ func GetMetrics(cephConn mytypes.CephConnector) {
if !v.HasRBD {continue}
FillMetrics(v,metrics)
}
fmt.Println("====================")
logger.Logger.Debug("====================")
// fmt.Println(result)
}
}
@@ -79,5 +76,4 @@ func FillMetrics(pool mytypes.Pool,metrics *mytypes.Metrics) {
metrics.Total_rbd_requested_size_per_pool.WithLabelValues(pool.Name,
).Set(
float64(totalSizePerPool))
}