Skip to content

Commit c723ffb

Browse files
qmuntalCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 53f46ab commit c723ffb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

go/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ func (c *Client) DeleteSession(ctx context.Context, sessionID string) error {
904904
// Example:
905905
//
906906
// if client.State() == copilot.StateConnected {
907-
// session, err := client.CreateSession(nil)
907+
// session, err := client.CreateSession(context.Background(), nil)
908908
// }
909909
func (c *Client) State() ConnectionState {
910910
return c.state

go/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (s *Session) SendAndWait(ctx context.Context, options MessageOptions) (*Ses
209209
case err := <-errCh:
210210
return nil, err
211211
case <-ctx.Done(): // TODO: remove once session.Send honors the context
212-
return nil, fmt.Errorf("timeout after %v waiting for session.idle", ctx.Err())
212+
return nil, fmt.Errorf("waiting for session.idle: %w", ctx.Err())
213213
}
214214
}
215215

0 commit comments

Comments
 (0)