Skip to content

Commit

Permalink
remove example
Browse files Browse the repository at this point in the history
  • Loading branch information
Pete Fraedrich committed Mar 27, 2020
1 parent a2602bf commit feca812
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions consulmq_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package consulmq

import (
"fmt"
"io/ioutil"
"testing"

Expand Down Expand Up @@ -104,37 +103,3 @@ func TestPopLast(t *testing.T) {
t.Error("Data does not match test string!")
}
}

func Example() {
mq, err := Connect(Config{
Address: "172.17.0.2:8500",
Datacenter: "dc1",
Token: "",
MQName: "cmq",
})
if err != nil {
panic(err)
}

i := 0
for i <= 100 {
// Put and item on the queue
qo, err := mq.Push([]byte("Hello, is it me you're looking for?"))
if err != nil {
panic(err)
}
fmt.Println(qo.ID)
i++
}
fmt.Println("++++++++++++++++++++++++++++++++++++++++++++++++++++++")
x := 0
for x <= 100 {
// Pop an item off the queue
_, qo, err := mq.Pop()
if err != nil {
panic(err)
}
fmt.Println(qo.ID)
x++
}
}

0 comments on commit feca812

Please sign in to comment.