chore: refine getItem (#6)
parent
ebc5c30a94
commit
9dada0a9b5
|
@ -56,11 +56,7 @@ func getItem(ctx context.Context, c *clientv3.Client, prefix string, opts []clie
|
||||||
|
|
||||||
// nothing yet; wait on elements
|
// nothing yet; wait on elements
|
||||||
if len(resp.Kvs) == 0 {
|
if len(resp.Kvs) == 0 {
|
||||||
ev, err := waitPrefixEvents(
|
ev, err := waitPrefixEvents(ctx, c, prefix, resp.Header.Revision)
|
||||||
ctx,
|
|
||||||
c,
|
|
||||||
prefix,
|
|
||||||
resp.Header.Revision)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue