Skip to content

Commit e3f8260

Browse files
committed
chore: rename body to payload
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent b086c45 commit e3f8260

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/golang-queue/nsq
33
go 1.16
44

55
require (
6-
github.com/golang-queue/queue v0.0.11
6+
github.com/golang-queue/queue v0.0.12-0.20220122071422-2c41650f045a
77
github.com/nsqio/go-nsq v1.1.0
88
github.com/stretchr/testify v1.7.0
99
go.uber.org/goleak v1.1.12

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8
22
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/golang-queue/queue v0.0.11 h1:qaE7rOYUh+11NcO6U9zZ7NazglIwEp0j7Dn0sSoavcI=
44
github.com/golang-queue/queue v0.0.11/go.mod h1:ku8iyjYffqYY6Duts+xl+QYfN3/KDK4MEvXMZUkHyio=
5+
github.com/golang-queue/queue v0.0.12-0.20220122071422-2c41650f045a h1:olgbdu53u5A6Babr1w+CUO19UdZASYPPqqIBfdFWrWE=
6+
github.com/golang-queue/queue v0.0.12-0.20220122071422-2c41650f045a/go.mod h1:ku8iyjYffqYY6Duts+xl+QYfN3/KDK4MEvXMZUkHyio=
57
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
68
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
79
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=

nsq_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ func TestGoroutinePanic(t *testing.T) {
295295
func TestHandleTimeout(t *testing.T) {
296296
job := queue.Job{
297297
Timeout: 100 * time.Millisecond,
298-
Body: []byte("foo"),
298+
Payload: []byte("foo"),
299299
}
300300
w := NewWorker(
301301
WithRunFunc(func(ctx context.Context, m queue.QueuedMessage) error {
@@ -311,7 +311,7 @@ func TestHandleTimeout(t *testing.T) {
311311

312312
job = queue.Job{
313313
Timeout: 150 * time.Millisecond,
314-
Body: []byte("foo"),
314+
Payload: []byte("foo"),
315315
}
316316

317317
w = NewWorker(
@@ -337,7 +337,7 @@ func TestHandleTimeout(t *testing.T) {
337337
func TestJobComplete(t *testing.T) {
338338
job := queue.Job{
339339
Timeout: 100 * time.Millisecond,
340-
Body: []byte("foo"),
340+
Payload: []byte("foo"),
341341
}
342342
w := NewWorker(
343343
WithRunFunc(func(ctx context.Context, m queue.QueuedMessage) error {
@@ -352,7 +352,7 @@ func TestJobComplete(t *testing.T) {
352352

353353
job = queue.Job{
354354
Timeout: 250 * time.Millisecond,
355-
Body: []byte("foo"),
355+
Payload: []byte("foo"),
356356
}
357357

358358
w = NewWorker(
@@ -378,7 +378,7 @@ func TestJobComplete(t *testing.T) {
378378
func TestBusyWorkerCount(t *testing.T) {
379379
job := queue.Job{
380380
Timeout: 500 * time.Millisecond,
381-
Body: []byte("foo"),
381+
Payload: []byte("foo"),
382382
}
383383

384384
w := NewWorker(

0 commit comments

Comments
 (0)