Skip to content

Commit

Permalink
Fix typo in (*Client).MultiPublish method name
Browse files Browse the repository at this point in the history
 * Rename (*Client).MutliPublish to (*Client).MultiPublish.
 * Add (*Client).MutliPublish as an alias for backwards compatibility.
  • Loading branch information
seoester committed Oct 4, 2019
1 parent ff4eef9 commit ea808ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nsq.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ func (c *Client) Publish(topic string, message []byte) (err error) {
return
}

func (c *Client) MutliPublish(topic string, messages ...[]byte) (err error) {
// MutliPublish is an alias of MultiPublish, here for backwards
// compatibility.
func (c *Client) MutliPublish(topic string, messages ...[]byte) error {
return c.MultiPublish(topic, messages)
}

func (c *Client) MultiPublish(topic string, messages ...[]byte) (err error) {
_, err = c.do("POST", "/mpub", url.Values{
"topic": []string{topic},
}, bytes.Join(messages, []byte("\n")))
Expand Down

0 comments on commit ea808ce

Please sign in to comment.