Skip to content

Commit 92e7843

Browse files
committed
tests/robustness: use pointer for toWatchEvent
Signed-off-by: Wei Fu <[email protected]>
1 parent 925aee0 commit 92e7843

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/robustness/client/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func ToWatchResponse(r clientv3.WatchResponse, baseTime time.Time) model.WatchRe
341341
// see https://github.com/golang/go/blob/master/src/time/time.go#L17
342342
resp := model.WatchResponse{Time: time.Since(baseTime)}
343343
for _, event := range r.Events {
344-
resp.Events = append(resp.Events, toWatchEvent(*event))
344+
resp.Events = append(resp.Events, toWatchEvent(event))
345345
}
346346
resp.IsProgressNotify = r.IsProgressNotify()
347347
resp.Revision = r.Header.Revision
@@ -352,7 +352,7 @@ func ToWatchResponse(r clientv3.WatchResponse, baseTime time.Time) model.WatchRe
352352
return resp
353353
}
354354

355-
func toWatchEvent(event clientv3.Event) (watch model.WatchEvent) {
355+
func toWatchEvent(event *clientv3.Event) (watch model.WatchEvent) {
356356
watch.Revision = event.Kv.ModRevision
357357
watch.Key = string(event.Kv.Key)
358358
watch.Value = model.ToValueOrHash(string(event.Kv.Value))

0 commit comments

Comments
 (0)