// Package main simple test for battery funtionality. package main import ( "fmt" "time" "github.com/davecgh/go-spew/spew" "github.com/distatus/battery" ) // Program entry point. func main() { for { batteries, _ := battery.GetAll() for index, battery := range batteries { fmt.Printf("Battery %d: %s\n", index, spew.Sdump(battery)) } time.Sleep(1 * time.Second) } } /* vim: set ft=go noet ai ts=4 sw=4 sts=4: */