From e0166c6eb294221d2222079efb070d73545ab0f3 Mon Sep 17 00:00:00 2001 From: Michael Beutler Date: Thu, 20 Feb 2025 18:25:25 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20lint=20error.=20=F0=9F=8E=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/http_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/http_test.go b/cmd/http_test.go index ecbb71f..e3dd5da 100644 --- a/cmd/http_test.go +++ b/cmd/http_test.go @@ -143,8 +143,12 @@ func TestHTTPCmd(t *testing.T) { logger.NewLogger() defer logger.Sync() - httpCmd.Flags().Set("port", "38888") - httpCmd.Flags().Set("host", "127.0.0.1") + if httpCmd.Flags().Set("port", "38888") != nil { + t.Fatalf("failed to set port flag") + } + if httpCmd.Flags().Set("host", "127.0.0.1") != nil { + t.Fatalf("failed to set host flag") + } go func() { // call the command handler function