From: Sergey Matveev Date: Thu, 23 Mar 2023 10:48:24 +0000 (+0300) Subject: Excess loop X-Git-Tag: v1.10.0~5 X-Git-Url: http://www.git.cypherpunks.ru/?p=goircd.git;a=commitdiff_plain;h=e864070881a48595b4977b22aa0bf3b48a28d654 Excess loop --- diff --git a/client.go b/client.go index 10ae383..e2bc5b2 100644 --- a/client.go +++ b/client.go @@ -188,10 +188,7 @@ func (c *Client) Reply(text string) { } func (c *Client) ReplyParts(code string, text ...string) { - parts := []string{code} - for _, t := range text { - parts = append(parts, t) - } + parts := append([]string{code}, text...) parts[len(parts)-1] = ":" + parts[len(parts)-1] c.Reply(strings.Join(parts, " ")) }