Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie0129 committed Apr 16, 2023
1 parent 393f670 commit 610871e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 610871e

Please sign in to comment.