Documentation
¶
Overview ¶
Package battery provides battery information for the host and connected devices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasReadableBattery ¶
func HasReadableBattery() bool
HasReadableBattery reports whether collection currently finds a readable battery.
Types ¶
type Battery ¶ added in v0.18.8
type Battery struct {
Name string
Percent uint8
State uint8
FullChargeCapacity uint64
HasFullChargeCapacity bool
System bool
}
Battery is a readable battery reported by the operating system.
func GetBatteryStats ¶
GetBatteryStats re-enumerates power supplies and returns every readable battery.
Click to show internal directories.
Click to hide internal directories.