Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add DeleteMsg() to Queue

  • Loading branch information...
commit 986a3e71df9e99b1bb6c11770d7e5d7e20f1737c 1 parent 7306a6b
James Cooper coopernurse authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 ironmq.go
6 ironmq.go
@@ -195,6 +195,10 @@ func (q *Queue) PushMsg(msg *Message) (id string, err error) {
195 195 return resp.IDs[0], nil
196 196 }
197 197
  198 +func (q *Queue) DeleteMsg(id string) error {
  199 + return q.Client.req("DELETE", "queues/"+q.Name+"/messages/"+id, nil, nil)
  200 +}
  201 +
198 202 type Message struct {
199 203 Id string `json:"id,omitempty"`
200 204 Body string `json:"body"`
@@ -208,5 +212,5 @@ type Message struct {
208 212 }
209 213
210 214 func (m *Message) Delete() error {
211   - return m.q.Client.req("DELETE", "queues/"+m.q.Name+"/messages/"+m.Id, nil, nil)
  215 + return m.q.DeleteMsg(m.Id)
212 216 }

0 comments on commit 986a3e7

Please sign in to comment.
Something went wrong with that request. Please try again.