From 7302609e9015f0859335406c4cc83eebeb1052e1 Mon Sep 17 00:00:00 2001 From: guoguangwu <guoguangwu@magic-shield.com> Date: Mon, 10 Jul 2023 09:56:48 +0800 Subject: [PATCH] chore: unnecessary use of fmt.Sprintf --- slacktest/data.go | 4 ++-- slacktest/server_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/slacktest/data.go b/slacktest/data.go index e33b901dc..19b49e1b8 100644 --- a/slacktest/data.go +++ b/slacktest/data.go @@ -35,11 +35,11 @@ var okWebResponse = slack.SlackResponse{ Ok: true, } -var defaultOkJSON = fmt.Sprintf(` +var defaultOkJSON = ` { "ok": true } - `) + ` var defaultChannelsListJSON = fmt.Sprintf(` { diff --git a/slacktest/server_test.go b/slacktest/server_test.go index ac4244471..45f620858 100644 --- a/slacktest/server_test.go +++ b/slacktest/server_test.go @@ -48,7 +48,7 @@ func TestBotDirectMessageBotHandler(t *testing.T) { s := NewTestServer() go s.Start() s.SendDirectMessageToBot("some text") - expectedMsg := fmt.Sprintf("some text") + expectedMsg := "some text" time.Sleep(2 * time.Second) assert.True(t, s.SawOutgoingMessage(expectedMsg)) s.Stop()