Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb69dd02

Browse files
committed
lint
1 parente7ececa commitb69dd02

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

‎codersdk/client.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@ func (c *Client) Request(ctx context.Context, method, path string, body interfac
8686
func (c*Client)websocket(ctx context.Context,pathstring) (*websocket.Conn,error) {
8787
serverURL,err:=c.URL.Parse(path)
8888
iferr!=nil {
89-
returnnil,xerrors.Errorf("parseurl: %w",err)
89+
returnnil,xerrors.Errorf("parsepath: %w",err)
9090
}
9191

9292
apiURL,err:=url.Parse(serverURL.String())
93+
iferr!=nil {
94+
returnnil,xerrors.Errorf("parse server url: %w",err)
95+
}
9396
apiURL.Scheme="ws"
9497
ifserverURL.Scheme=="https" {
9598
apiURL.Scheme="wss"
@@ -100,7 +103,7 @@ func (c *Client) websocket(ctx context.Context, path string) (*websocket.Conn, e
100103
apiURL.RawQuery=q.Encode()
101104

102105
//nolint:bodyclose
103-
conn,_,err:=websocket.Dial(context.Background(),apiURL.String(),&websocket.DialOptions{
106+
conn,_,err:=websocket.Dial(ctx,apiURL.String(),&websocket.DialOptions{
104107
HTTPClient:c.HTTPClient,
105108
})
106109
iferr!=nil {

‎codersdk/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (w *WorkspaceWatcher) Read(ctx context.Context) (Workspace, error) {
102102
varwsWorkspace
103103
err:=wsjson.Read(ctx,w.conn,&ws)
104104
iferr!=nil {
105-
returnws,xerrors.Errorf("read workspace: %w")
105+
returnws,xerrors.Errorf("read workspace: %w",err)
106106
}
107107

108108
returnws,nil

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp