battery alternatives and similar packages
Based on the "Miscellaneous" category.
Alternatively, view battery alternatives based on common mentions on social networks and blogs.
-
go-restful-api
An idiomatic Go REST API starter kit (boilerplate) following the SOLID principles and Clean Architecture -
ghorg
Quickly clone or backup an entire org/users repositories into one directory - Supports GitHub, GitLab, Bitbucket, and more ๐๐ฅ -
IOC-golang
IOC-golang is a powerful golang dependency injection framework that provides a complete implementation of IoC containers. -
go-starter
An opinionated production-ready SQL-/Swagger-first RESTful JSON API written in Go, highly integrated with VSCode DevContainers by allaboutapps. -
container
A lightweight yet powerful IoC dependency injection container for the Go programming language -
gountries
Gountries provides: Countries (ISO-3166-1), Country Subdivisions(ISO-3166-2), Currencies (ISO 4217), Geo Coordinates(ISO-6709) as well as translations, country borders and other stuff exposed as struct data. -
countries
Countries - ISO-639, ISO-3166 countries codes with subdivisions and names, ISO-4217 currency designators, ITU-T E.164 IDD phone codes, countries capitals, UN M.49 codes, IANA ccTLD countries domains, FIPS, IOC/NOC and FIFA codes, VERY VERY FAST, compatible with Databases/JSON/BSON/GOB/XML/CSV, Emoji countries flags and currencies, Unicode CLDR.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of battery or a related project?
README
battery
Cross-platform, normalized battery information library.
Gives access to a system independent, typed battery state, capacity, charge and voltage values recalculated as necessary to be returned in mW, mWh or V units.
Currently supported systems:
- Linux 2.6.39+
- OS X 10.10+
- Windows XP+
- FreeBSD
- DragonFlyBSD
- NetBSD
- OpenBSD
- Solaris
Installation
$ go get -u github.com/distatus/battery
Code Example
import (
"fmt"
"github.com/distatus/battery"
)
func main() {
batteries, err := battery.GetAll()
if err != nil {
fmt.Println("Could not get battery info!")
return
}
for i, battery := range batteries {
fmt.Printf("Bat%d: ", i)
fmt.Printf("state: %f, ", battery.State)
fmt.Printf("current capacity: %f mWh, ", battery.Current)
fmt.Printf("last full capacity: %f mWh, ", battery.Full)
fmt.Printf("design capacity: %f mWh, ", battery.Design)
fmt.Printf("charge rate: %f mW, ", battery.ChargeRate)
fmt.Printf("voltage: %f V, ", battery.Voltage)
fmt.Printf("design voltage: %f V\n", battery.DesignVoltage)
}
}
CLI
There is also a little utility which - more or less - mimicks the GNU/Linux acpi -b
command.
Installation
$ go get -u github.com/distatus/battery/cmd/battery
Usage
$ battery
BAT0: Full, 95.61% [Voltage: 12.15V (design: 12.15V)]