diff --git a/conn.go b/conn.go index 9f97edadc5afb86b6474b24ebc8dec6208f44f70..90fcec439382c8186a9e617ddf87361e6f01e6d5 100644 --- a/conn.go +++ b/conn.go @@ -5,7 +5,7 @@ import "context" var _ Conn = (*Client)(nil) type Conn interface { - Call(ctx context.Context, result any, method string, params ...any) error + Do(ctx context.Context, result any, method string, params any) error BatchCall(ctx context.Context, b ...BatchElem) error SetHeader(key, value string) Close() error diff --git a/helper.go b/helper.go index d70ddda080fa16d75601cdf70d9cf65c189ab9e0..6288cdc4b6e445f522daef19f59a8010a689827d 100644 --- a/helper.go +++ b/helper.go @@ -4,7 +4,7 @@ import "context" func Do[T any](ctx context.Context, c Conn, method string, args any) (*T, error) { var t T - err := c.Call(ctx, &t, method, args) + err := c.Do(ctx, &t, method, args) if err != nil { return nil, err } @@ -13,7 +13,7 @@ func Do[T any](ctx context.Context, c Conn, method string, args any) (*T, error) func Call[T any](ctx context.Context, c Conn, method string, args ...any) (*T, error) { var t T - err := c.Call(ctx, &t, method, args) + err := c.Do(ctx, &t, method, args) if err != nil { return nil, err }