Fix more golangci-lint warnings and update its config, bump required version of go compiler to 1.24.2

This commit is contained in:
eleksir
2025-04-07 20:14:14 +03:00
parent f905ba79a3
commit 44dbaee87a
9 changed files with 60 additions and 47 deletions

View File

@@ -11,11 +11,11 @@ import (
// UpdateBatteryInfo updates info about battery charge.
func (c *MyConfig) UpdateBatteryInfo() {
var (
ch int
status string
Batts string
InitialDelay time.Duration = 100 * time.Millisecond
LoopIterationDelay time.Duration = 5 * time.Second
ch int
status string
Batts string
InitialDelay = 100 * time.Millisecond
LoopIterationDelay = 5 * time.Second
)
Delay := InitialDelay
@@ -30,7 +30,7 @@ func (c *MyConfig) UpdateBatteryInfo() {
batteries, _ := battery.GetAll()
// In theory, this module should give for each entry its separate err, but in practice it gives
// one single err for all entries, so we cannot detemine whist exatly entry errored.
var (
battsInfo string
chStr string