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

Commit47036e8

Browse files
committed
fix linter complaint re nil ptr deref
1 parent4e51f20 commit47036e8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎coderd/workspacebuilds.go‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,12 @@ func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) {
387387
})
388388
return
389389
}
390-
err=provisionerjobs.PostJob(api.Pubsub,*provisionerJob)
391-
iferr!=nil {
392-
// Client probably doesn't care about this error, so just log it.
393-
api.Logger.Error(ctx,"failed to post provisioner job to pubsub",slog.Error(err))
390+
391+
ifprovisionerJob!=nil {
392+
iferr:=provisionerjobs.PostJob(api.Pubsub,*provisionerJob);err!=nil {
393+
// Client probably doesn't care about this error, so just log it.
394+
api.Logger.Error(ctx,"failed to post provisioner job to pubsub",slog.Error(err))
395+
}
394396
}
395397

396398
varmatchedProvisioners codersdk.MatchedProvisioners

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp