Skip to content

Commit 9f5bcfd

Browse files
committed
docs: update single example
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 14fc9e6 commit 9f5bcfd

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
@@ -4,7 +4,7 @@ go 1.18
44

55
require (
66
github.com/golang-queue/nats v0.0.2-0.20210822122542-200fdcf19ebf
7-
github.com/golang-queue/queue v0.0.13-0.20220403053548-d431277d570f
7+
github.com/golang-queue/queue v0.0.13-0.20220423025512-c4a8df54c917
88
)
99

1010
require (

_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.20220423025512-c4a8df54c917 h1:+khkGHxQPsad/mfmgizoTc3Jh5UVdCp1OfUkDfW+uDQ=
3+
github.com/golang-queue/queue v0.0.13-0.20220423025512-c4a8df54c917/go.mod h1:g1yxxDl8JMo4gUfxt11fjjU3SXU1ah61EvwshmDoSIs=
4+
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
45
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
56
github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A=
67
github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=

_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/nats"
1111
"github.com/golang-queue/queue"
12+
"github.com/golang-queue/queue/core"
1213
)
1314

1415
type job struct {
@@ -32,7 +33,7 @@ func main() {
3233
nats.WithAddr("127.0.0.1:4222"),
3334
nats.WithSubj("example"),
3435
nats.WithQueue("foobar"),
35-
nats.WithRunFunc(func(ctx context.Context, m queue.QueuedMessage) error {
36+
nats.WithRunFunc(func(ctx context.Context, m core.QueuedMessage) error {
3637
var v *job
3738
if err := json.Unmarshal(m.Bytes(), &v); err != nil {
3839
return err

0 commit comments

Comments
 (0)