Skip to content

Commit 1c97ab1

Browse files
committed
Fix typo in (*Client).MultiPublish method name
* Rename (*Client).MutliPublish to (*Client).MultiPublish. * Add (*Client).MutliPublish as an alias for backwards compatibility.
1 parent 2867d16 commit 1c97ab1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

nsq.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ func (c *Client) Publish(topic string, message []byte) (err error) {
2828
return
2929
}
3030

31-
func (c *Client) MutliPublish(topic string, messages ...[]byte) (err error) {
31+
// MutliPublish is an alias of MultiPublish.
32+
//
33+
// Deprecated: Use MultiPublish instead.
34+
func (c *Client) MutliPublish(topic string, messages ...[]byte) error {
35+
return c.MultiPublish(topic, messages)
36+
}
37+
38+
func (c *Client) MultiPublish(topic string, messages ...[]byte) (err error) {
3239
_, err = c.do("POST", "/mpub", url.Values{
3340
"topic": []string{topic},
3441
}, bytes.Join(messages, []byte("\n")))

0 commit comments

Comments
 (0)