From 84a14c181173fb7fd70d5c5d04ac29492b0a8cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=B2=E3=81=AE=E7=8E=8B?= <8919794+CreatCodeBuild@users.noreply.github.com> Date: Mon, 23 Nov 2020 16:06:23 +0800 Subject: [PATCH] Update README.md battery.State is a Stringer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ba46fa..b0a7195 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ func main() { } for i, battery := range batteries { fmt.Printf("Bat%d: ", i) - fmt.Printf("state: %f, ", battery.State) + fmt.Printf("state: %s, ", battery.State.String()) 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)