Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion nsq.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ 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.
//
// Deprecated: Use MultiPublish instead.
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