Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
daoshenzzg committed May 20, 2024
1 parent b0a134e commit 0663d04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,9 @@ func Example_syncLocalUsage() {

go func() {
for {
msg, err := pubSub.ReceiveMessage(context.Background())
if err != nil {
panic(err)
}
msg := <-pubSub.Channel()
var event *cache.Event
if err = json.Unmarshal([]byte(msg.Payload), &event); err != nil {
if err := json.Unmarshal([]byte(msg.Payload), &event); err != nil {
panic(err)
}
fmt.Println(event.Keys)
Expand Down
7 changes: 2 additions & 5 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,9 @@ func Example_syncLocalUsage() {

go func() {
for {
msg, err := pubSub.ReceiveMessage(context.Background())
if err != nil {
panic(err)
}
msg := <-pubSub.Channel()
var event *cache.Event
if err = json.Unmarshal([]byte(msg.Payload), &event); err != nil {
if err := json.Unmarshal([]byte(msg.Payload), &event); err != nil {
panic(err)
}
fmt.Println(event.Keys)
Expand Down

0 comments on commit 0663d04

Please sign in to comment.