Skip to content

Commit 5b07e4d

Browse files
committed
docs: update example
1 parent 835e27d commit 5b07e4d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

_example/single/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module example
22

33
go 1.18
44

5-
require github.com/golang-queue/queue v0.0.13-0.20220403053548-d431277d570f
5+
require github.com/golang-queue/queue v0.0.13-0.20220408035349-ed24fa14aa00
66

77
require (
88
github.com/golang-queue/nsq v0.0.0-00010101000000-000000000000

_example/single/go.sum

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2-
github.com/golang-queue/queue v0.0.13-0.20220403053548-d431277d570f h1:Wioq3g97ssizNPQsPwdL61DIjePabPaq+XYo7z2t2Oc=
3-
github.com/golang-queue/queue v0.0.13-0.20220403053548-d431277d570f/go.mod h1:KD9age1s6nk8Evz3tfKHsk8k4LwA0htxQ7MS7rJPJzA=
2+
github.com/golang-queue/queue v0.0.13-0.20220408035349-ed24fa14aa00 h1:EFiINOvAuGgxiE3MNu7PKY0O2Pvvc7r6YApdqAnhWnQ=
3+
github.com/golang-queue/queue v0.0.13-0.20220408035349-ed24fa14aa00/go.mod h1:g1yxxDl8JMo4gUfxt11fjjU3SXU1ah61EvwshmDoSIs=
4+
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
45
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
56
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
67
github.com/nsqio/go-nsq v1.1.0 h1:PQg+xxiUjA7V+TLdXw7nVrJ5Jbl3sN86EhGCQj4+FYE=

_example/single/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99

1010
"github.com/golang-queue/nsq"
1111
"github.com/golang-queue/queue"
12+
"github.com/golang-queue/queue/core"
1213
)
1314

1415
type job struct {
@@ -34,7 +35,7 @@ func main() {
3435
nsq.WithChannel("foobar"),
3536
// concurrent job number
3637
nsq.WithMaxInFlight(10),
37-
nsq.WithRunFunc(func(ctx context.Context, m queue.QueuedMessage) error {
38+
nsq.WithRunFunc(func(ctx context.Context, m core.QueuedMessage) error {
3839
var v *job
3940
if err := json.Unmarshal(m.Bytes(), &v); err != nil {
4041
return err

0 commit comments

Comments
 (0)