Skip to content

Commit

Permalink
Merge pull request vbatoufflet#7 from yneveu/master
Browse files Browse the repository at this point in the history
Fix trailing ; before sending command
  • Loading branch information
vbatoufflet authored Sep 5, 2017
2 parents f791686 + a9e0895 commit 26f60a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 26f60a8

Please sign in to comment.