diff options
| author | MidnightRocket <[email protected]> | 2025-03-21 18:03:46 +0100 |
|---|---|---|
| committer | MidnightRocket <[email protected]> | 2025-04-01 21:24:03 +0200 |
| commit | c96309303407244840d6f2bc00ae32dc95390c25 (patch) | |
| tree | 8b776ebe618ee95f5c1db63c1c4b71b3b35b0b60 | |
| parent | edb16648484c5752d70fd84f08b3aecc46e61339 (diff) | |
Improve readability for error in TestPrintDefaults
| -rw-r--r-- | flag_test.go | 4 |
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) } } |
