func ExampleList() { qs, err := mq.List() // Will get up to 30 queues. All ready to use. if err != nil { return err } // Pop a message off of each queue. for _, q := range qs { _, err := q.Pop() if err != nil { return err } } }
func (ir *IronRunner) setupQueues(queues []string) { qs, err := mq.List() for _, q := range qs { log.Println("[INFO] deleting queues") err = q.Delete() if err != nil { log.Println("delete err", err) } } for _, q := range queues { _, err := mq.CreateQueue(q, mq.QueueInfo{}) if err != nil { log.Println("err", err) } } }