Fix QF1011: could omit type ... from declaration; it will be inferred from the right-hand side (staticcheck)

This commit is contained in:
Holger Obermaier
2026-02-04 10:23:23 +01:00
parent 86710d9b4b
commit 159bee1e9f
4 changed files with 7 additions and 7 deletions

View File

@@ -174,7 +174,7 @@ func (m *MemstatCollector) Read(interval time.Duration, output chan lp.CCMessage
sendStats := func(stats map[string]MemstatStats, tags map[string]string) {
for match, name := range m.matches {
var value float64 = 0
var unit string = ""
unit := ""
if v, ok := stats[match]; ok {
value = v.value
if len(v.unit) > 0 {