errcheck issues fixed (#28643)

This commit is contained in:
Arya Khochare 2024-10-11 21:56:40 +05:30 committed by GitHub
parent 9eb424a252
commit d6343832d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -93,7 +93,6 @@ issues:
channels/api4/team_local.go|\
channels/api4/team_test.go|\
channels/api4/user.go|\
channels/api4/user_local.go|\
channels/api4/user_test.go|\
channels/api4/webhook_test.go|\
channels/api4/websocket_test.go|\

View File

@ -229,7 +229,9 @@ func localGetUsers(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
w.Write(js)
if _, err := w.Write(js); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func localGetUsersByIds(c *Context, w http.ResponseWriter, r *http.Request) {
@ -269,7 +271,9 @@ func localGetUsersByIds(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
w.Write(js)
if _, err := w.Write(js); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func localGetUser(c *Context, w http.ResponseWriter, r *http.Request) {
@ -435,5 +439,7 @@ func localGetUploadsForUser(c *Context, w http.ResponseWriter, r *http.Request)
return
}
w.Write(js)
if _, err := w.Write(js); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}