From f4ff4268f7448a2fa85442751de0b2159ba57e0b Mon Sep 17 00:00:00 2001 From: s7v7nislands Date: Wed, 2 Mar 2022 09:51:55 +0800 Subject: [PATCH] rpc: fix godoc (#24488) Co-authored-by: seven --- rpc/client.go | 4 ++-- rpc/subscription.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpc/client.go b/rpc/client.go index d55af7554..d3ce02977 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -186,7 +186,7 @@ func DialContext(ctx context.Context, rawurl string) (*Client, error) { } } -// Client retrieves the client from the context, if any. This can be used to perform +// ClientFromContext retrieves the client from the context, if any. This can be used to perform // 'reverse calls' in a handler method. func ClientFromContext(ctx context.Context) (*Client, bool) { client, ok := ctx.Value(clientContextKey{}).(*Client) @@ -333,7 +333,7 @@ func (c *Client) BatchCall(b []BatchElem) error { return c.BatchCallContext(ctx, b) } -// BatchCall sends all given requests as a single batch and waits for the server +// BatchCallContext sends all given requests as a single batch and waits for the server // to return a response for all of them. The wait duration is bounded by the // context's deadline. // diff --git a/rpc/subscription.go b/rpc/subscription.go index 942e764e5..d7ba784fc 100644 --- a/rpc/subscription.go +++ b/rpc/subscription.go @@ -34,7 +34,7 @@ import ( var ( // ErrNotificationsUnsupported is returned when the connection doesn't support notifications ErrNotificationsUnsupported = errors.New("notifications not supported") - // ErrNotificationNotFound is returned when the notification for the given id is not found + // ErrSubscriptionNotFound is returned when the notification for the given id is not found ErrSubscriptionNotFound = errors.New("subscription not found") )