agent: refactor new battery package (#1872)

This commit is contained in:
henrygd
2026-04-02 19:55:48 -04:00
committed by hank
parent 80b73c7faf
commit d656036d3b
7 changed files with 33 additions and 84 deletions

View File

@@ -1,14 +1,11 @@
//go:build !freebsd && !darwin && !linux && !windows
// Package battery provides functions to check if the system has a battery and to get the battery stats.
package battery
import "errors"
func HasReadableBattery() bool {
return false
}
func GetBatteryStats() (uint8, uint8, error) {
return 0, 0, errors.ErrUnsupported
}
const (
stateUnknown uint8 = iota
stateEmpty
stateFull
stateCharging
stateDischarging
stateIdle
)