Skip to content

Commit ba7999e

Browse files
committed
metrics: align collectors new-functions with Go conventions
Go lang conventions prefer all uppercase for abbreviation in func name. Rename newSmbXxxx into newSMBXxxx method names. Signed-off-by: Shachar Sharon <[email protected]>
1 parent 6a7eb74 commit ba7999e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/metrics/collectors.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ var (
1212

1313
func (sme *smbMetricsExporter) register() error {
1414
cols := []prometheus.Collector{
15-
sme.newSmbVersionsCollector(),
16-
sme.newSmbSharesCollector(),
17-
sme.newSmbLocksCollector(),
15+
sme.newSMBVersionsCollector(),
16+
sme.newSMBSharesCollector(),
17+
sme.newSMBLocksCollector(),
1818
}
1919
for _, c := range cols {
2020
if err := sme.reg.Register(c); err != nil {
@@ -60,7 +60,7 @@ func (col *smbVersionsCollector) Collect(ch chan<- prometheus.Metric) {
6060
)
6161
}
6262

63-
func (sme *smbMetricsExporter) newSmbVersionsCollector() prometheus.Collector {
63+
func (sme *smbMetricsExporter) newSMBVersionsCollector() prometheus.Collector {
6464
col := &smbVersionsCollector{}
6565
col.sme = sme
6666
col.clnt, _ = newKClient()
@@ -97,7 +97,7 @@ func (col *smbSharesCollector) Collect(ch chan<- prometheus.Metric) {
9797
prometheus.GaugeValue, float64(sharesTotal))
9898
}
9999

100-
func (sme *smbMetricsExporter) newSmbSharesCollector() prometheus.Collector {
100+
func (sme *smbMetricsExporter) newSMBSharesCollector() prometheus.Collector {
101101
col := &smbSharesCollector{}
102102
col.sme = sme
103103
col.dsc = []*prometheus.Desc{
@@ -124,7 +124,7 @@ func (col *smbLocksCollector) Collect(ch chan<- prometheus.Metric) {
124124
prometheus.GaugeValue, float64(len(locks)))
125125
}
126126

127-
func (sme *smbMetricsExporter) newSmbLocksCollector() prometheus.Collector {
127+
func (sme *smbMetricsExporter) newSMBLocksCollector() prometheus.Collector {
128128
col := &smbLocksCollector{}
129129
col.sme = sme
130130
col.dsc = []*prometheus.Desc{

0 commit comments

Comments
 (0)