From d59a75bd70e701a942e1f970a6fc75e308b2d614 Mon Sep 17 00:00:00 2001 From: alallema Date: Mon, 31 Jan 2022 13:49:04 +0100 Subject: [PATCH] Changes due to review --- client.go | 2 +- index.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client.go b/client.go index 31dcea50..0ef5a2df 100644 --- a/client.go +++ b/client.go @@ -43,7 +43,7 @@ type ClientInterface interface { GetTask(taskID int64) (resp *Task, err error) GetTasks() (resp *ResultTask, err error) WaitForTask(ctx context.Context, interval time.Duration, task *Task) (*Task, error) - DefaultWaitForTask(taskID *Task) (*Task, error) + DefaultWaitForTask(task *Task) (*Task, error) } var _ ClientInterface = &Client{} diff --git a/index.go b/index.go index 012688ed..cddab7cf 100644 --- a/index.go +++ b/index.go @@ -68,8 +68,8 @@ type IndexInterface interface { UpdateFilterableAttributes(request *[]string) (resp *Task, err error) ResetFilterableAttributes() (resp *Task, err error) - WaitForTask(ctx context.Context, interval time.Duration, taskID *Task) (*Task, error) - DefaultWaitForTask(taskID *Task) (*Task, error) + WaitForTask(ctx context.Context, interval time.Duration, task *Task) (*Task, error) + DefaultWaitForTask(task *Task) (*Task, error) } var _ IndexInterface = &Index{} @@ -208,6 +208,6 @@ func (i Index) DefaultWaitForTask(taskID *Task) (*Task, error) { func (i Index) WaitForTask( ctx context.Context, interval time.Duration, - taskID *Task) (*Task, error) { - return i.client.WaitForTask(ctx, interval, taskID) + task *Task) (*Task, error) { + return i.client.WaitForTask(ctx, interval, task) }