Skip to content

Commit ae923fb

Browse files
committed
chore: update example
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent aaa0f01 commit ae923fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

_example/simple/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
)
1313

1414
type job struct {
15+
Name string
1516
Message string
1617
}
1718

@@ -38,7 +39,7 @@ func main() {
3839
}
3940
}
4041

41-
rets <- v.Message
42+
rets <- "Hi, " + v.Name + ", " + v.Message
4243
return nil
4344
}),
4445
)
@@ -59,6 +60,7 @@ func main() {
5960
for i := 0; i < taskN; i++ {
6061
go func(i int) {
6162
q.Queue(&job{
63+
Name: "foobar",
6264
Message: fmt.Sprintf("handle the job: %d", i+1),
6365
})
6466
}(i)

0 commit comments

Comments
 (0)