From 227228f1e4e040b2dd2132e2bcaf24f83d622c16 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 24 Feb 2023 22:35:40 +0400 Subject: [PATCH] test: fix usage printing --- musttag_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/musttag_test.go b/musttag_test.go index 459ccb1..0b81bbf 100644 --- a/musttag_test.go +++ b/musttag_test.go @@ -40,7 +40,8 @@ func TestAnalyzer(t *testing.T) { func TestFlags(t *testing.T) { analyzer := New() - analyzer.Flags.SetOutput(io.Discard) // TODO(junk1tm): does not work, the usage is still printed. + analyzer.Flags.Usage = func() {} + analyzer.Flags.SetOutput(io.Discard) t.Run("ok", func(t *testing.T) { err := analyzer.Flags.Parse([]string{"-fn=test.Test:test:0"})