From ed93349c192e5836498ac94648b0f1956bb36f48 Mon Sep 17 00:00:00 2001 From: bpicode Date: Wed, 11 Jul 2018 20:31:02 +0200 Subject: [PATCH] Fix formatting directive: usage string after error message --- cmd/temperature.go | 2 +- cmd/toggle.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/temperature.go b/cmd/temperature.go index 1a3a305b..bc0bd9fc 100644 --- a/cmd/temperature.go +++ b/cmd/temperature.go @@ -33,7 +33,7 @@ func init() { } func changeTemperature(cmd *cobra.Command, args []string) error { - assertMinLen(args, 2, "insufficient input: at least two parameters expected.\n\n", cmd.UsageString()) + assertMinLen(args, 2, "insufficient input: at least two parameters expected.\n\n%s", cmd.UsageString()) val := args[0] action := changeAction(val) action(val, args[1:]...) diff --git a/cmd/toggle.go b/cmd/toggle.go index 5c0943e8..8e137a1e 100644 --- a/cmd/toggle.go +++ b/cmd/toggle.go @@ -17,7 +17,7 @@ func init() { } func toggle(cmd *cobra.Command, args []string) error { - assertMinLen(args, 1, "insufficient input: device name(s) expected.\n\n", cmd.UsageString()) + assertMinLen(args, 1, "insufficient input: device name(s) expected.\n\n%s", cmd.UsageString()) c := homeAutoClient() err := c.Toggle(args...) assertNoErr(err, "error toggling device(s)")