]> Cypherpunks.ru repositories - goircd.git/commitdiff
Excess loop
authorSergey Matveev <stargrave@stargrave.org>
Thu, 23 Mar 2023 10:48:24 +0000 (13:48 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 23 Mar 2023 10:48:24 +0000 (13:48 +0300)
client.go

index 10ae3836272d71641d2778165bfdf8c967c38221..e2bc5b212ad22d61b08cab8930211c5d9d3b69d5 100644 (file)
--- 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, " "))
 }