From 66566a8f73caa7af0a5d8cbef45e2cf889c5f7bf Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Tue, 03 Jun 2025 06:31:29 +0000 Subject: [PATCH] better method param names for LexDo() --- xrpc/xrpc.go | 4 ++-- lex/util/client.go | 4 +++- 2 file(s) changed, 5 insertion(s)(+), 3 deletion(s)(-) diff --git a/xrpc/xrpc.go b/xrpc/xrpc.go --- a/xrpc/xrpc.go +++ b/xrpc/xrpc.go @@ -226,6 +226,6 @@ return nil } -func (c *Client) LexDo(ctx context.Context, kind string, inpenc string, method string, params map[string]any, bodyobj any, out any) error { - return c.Do(ctx, kind, inpenc, method, params, bodyobj, out) +func (c *Client) LexDo(ctx context.Context, method string, inputEncoding string, endpoint string, params map[string]any, bodyData any, out any) error { + return c.Do(ctx, method, inputEncoding, endpoint, params, bodyData, out) } diff --git a/lex/util/client.go b/lex/util/client.go --- a/lex/util/client.go +++ b/lex/util/client.go @@ -11,6 +11,8 @@ ) // API client interface used in lexgen. +// +// 'method' is the HTTP method type. 'inputEncoding' is the Content-Type for bodyData in Procedure calls. 'params' are query parameters. 'bodyData' should be either 'nil', an [io.Reader], or a type which can be marshalled to JSON. 'out' is optional; if not nil it should be a pointer to a type which can be un-Marshaled as JSON, for the response body. type LexClient interface { - LexDo(ctx context.Context, kind string, inpenc string, method string, params map[string]any, bodyobj any, out any) error + LexDo(ctx context.Context, method string, inputEncoding string, endpoint string, params map[string]any, bodyData any, out any) error } -- tangled.sh