From c96309303407244840d6f2bc00ae32dc95390c25 Mon Sep 17 00:00:00 2001 From: MidnightRocket Date: Fri, 21 Mar 2025 18:03:46 +0100 Subject: Improve readability for error in TestPrintDefaults --- flag_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flag_test.go b/flag_test.go index 344eb07..0dbe874 100644 --- a/flag_test.go +++ b/flag_test.go @@ -1246,9 +1246,7 @@ func TestPrintDefaults(t *testing.T) { fs.PrintDefaults() got := buf.String() if got != defaultOutput { - fmt.Println("\n" + got) - fmt.Printf("\n" + defaultOutput) - t.Errorf("got %q want %q\n", got, defaultOutput) + t.Errorf("\n--- Got:\n%s--- Wanted:\n%s\n", got, defaultOutput) } } -- cgit v1.2.3