aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
diff options
context:
space:
mode:
authorMidnightRocket <[email protected]>2025-03-21 18:03:46 +0100
committerMidnightRocket <[email protected]>2025-04-01 21:24:03 +0200
commitc96309303407244840d6f2bc00ae32dc95390c25 (patch)
tree8b776ebe618ee95f5c1db63c1c4b71b3b35b0b60 /flag_test.go
parentedb16648484c5752d70fd84f08b3aecc46e61339 (diff)
Improve readability for error in TestPrintDefaults
Diffstat (limited to 'flag_test.go')
-rw-r--r--flag_test.go4
1 files changed, 1 insertions, 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)
}
}