This is an automated email from the ASF dual-hosted git repository. sjanc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git
commit 352f04d4e77a4791bd6c3fcf8cb30d5c0ec4982f Author: Szymon Janc <[email protected]> AuthorDate: Thu Oct 22 00:14:10 2026 +0200 newtmgr/cli: Fix format strings in res command output The JSON marshal error was passed to fmt.Sprintf() without a verb and printDetails() output was used as a format string. Both are reported by go vet's printf check, which blocks unit tests in this package. Assisted-by: Claude:claude-opus-5-5 --- newtmgr/cli/res.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newtmgr/cli/res.go b/newtmgr/cli/res.go index fc422f4..7205be3 100644 --- a/newtmgr/cli/res.go +++ b/newtmgr/cli/res.go @@ -173,7 +173,7 @@ func resResponseStr(path string, cbor []byte) string { } j, err := json.MarshalIndent(cleanUpMapValue(m), "", " ") if err != nil { - s += fmt.Sprintf("\nerror: ", err) + s += fmt.Sprintf("\nerror: %s", err) } s += fmt.Sprintf("\n%v", string(j)) } else { @@ -401,7 +401,7 @@ func runResCmd(cmd *cobra.Command, args []string) { } if details { - fmt.Printf(printDetails(sres.Rsp)) + fmt.Print(printDetails(sres.Rsp)) } }
