Skip to content

Commit

Permalink
ci skip: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerinthenight authored Jul 17, 2024
1 parent e747f15 commit 9e2687f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ column=id, value=limit={num}
## How to use
Something like:
```go
client, _ := spanner.NewClient(context.Background(), "your/spanner/database")
ctx := context.Background()
client, _ := spanner.NewClient(ctx, "your/spanner/database")
defer client.Close()

op := hedge.New(
Expand All @@ -80,7 +81,7 @@ op := hedge.New(
),
})

ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(ctx)
done := make(chan error, 1) // optional wait
go op.Run(ctx, done)

Expand Down

0 comments on commit 9e2687f

Please sign in to comment.