From e68799168325680ab9b927b224c55571df190527 Mon Sep 17 00:00:00 2001 From: a <a@tuxpa.in> Date: Fri, 17 Feb 2023 00:25:04 -0600 Subject: [PATCH] idk if this works --- client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 8788b95..27d78a3 100644 --- a/client.go +++ b/client.go @@ -299,6 +299,7 @@ func (c *Client) Do(result any, method string, param any) error { ctx := context.Background() return c.DoContext(ctx, result, method, param) } + func (c *Client) DoContext(ctx context.Context, result any, method string, param any) error { if result != nil && reflect.TypeOf(result).Kind() != reflect.Ptr { return fmt.Errorf("call result parameter must be pointer or nil interface: %v", result) @@ -310,12 +311,12 @@ func (c *Client) DoContext(ctx context.Context, result any, method string, param return c.call(ctx, result, msg) } -// Deprecated: use Do +// Call calls Do, except accepts variadic parameters func (c *Client) Call(result any, method string, args ...any) error { return c.Do(result, method, args) } -// Deprecated: use DoContext +// CallContext calls DoContext, except accepts variadic parameters func (c *Client) CallContext(ctx context.Context, result any, method string, args ...any) error { return c.DoContext(ctx, result, method, args) } -- GitLab