From a9e089557a929017d39e63f496d46f7ba3592e6c Mon Sep 17 00:00:00 2001 From: Yann Neveu Date: Mon, 28 Aug 2017 17:19:10 +0200 Subject: [PATCH] Fix trailing ; before sending command --- command.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command.go b/command.go index 2bc97e2..bc5019e 100644 --- a/command.go +++ b/command.go @@ -80,6 +80,7 @@ func (c *Command) Exec() (*Response, error) { func (c *Command) buildCmd(t time.Time) (string, error) { cmdStr := fmt.Sprintf("COMMAND [%d] %s", t.Unix(), c.cmd) cmdStr = fmt.Sprintf("%s;%s", cmdStr, strings.Join(c.vals, ";")) + cmdStr = strings.TrimRight(cmdStr, ";") return fmt.Sprintf("%s\n", cmdStr), nil }