From 610871e4c4f122cef4e279b1f2544e9ecb850fe9 Mon Sep 17 00:00:00 2001 From: Charlie Chiang Date: Sun, 16 Apr 2023 13:08:02 +0800 Subject: [PATCH] chore: fix lint --- loop.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loop.go b/loop.go index 5894995..f30c329 100644 --- a/loop.go +++ b/loop.go @@ -113,7 +113,7 @@ func printStatus(batteryCharge int, limit int, isChargingEnabled bool, isPlugged isChargingEnabled == lastIsChargingEnabled && isPluggedIn == lastIsPluggedIn && maintainedChargingInProgress == lastMaintainedChargingInProgress && // All values are the same as last time - time.Now().Sub(lastTriedPrintTime) < time.Second*30 && // And it's been less than 30 seconds since last tried print + time.Since(lastTriedPrintTime) < time.Second*30 && // And it's been less than 30 seconds since last tried print !logrus.IsLevelEnabled(logrus.TraceLevel) { // Trace level is not enabled. If trace level is enabled, we want to print the status every time. // So we don't want to print the status every time. return