fix: scheme errcheck issues (#28543)

This commit is contained in:
Rohan Sharma 2024-10-09 15:28:16 +05:30 committed by GitHub
parent d1962e123e
commit 68404f2f33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -89,7 +89,6 @@ issues:
channels/api4/reaction_test.go|\
channels/api4/remote_cluster.go|\
channels/api4/role_test.go|\
channels/api4/scheme.go|\
channels/api4/scheme_test.go|\
channels/api4/shared_channel.go|\
channels/api4/status.go|\

View file

@ -105,7 +105,9 @@ func getSchemes(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 getTeamsForScheme(c *Context, w http.ResponseWriter, r *http.Request) {
@ -142,7 +144,9 @@ func getTeamsForScheme(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 getChannelsForScheme(c *Context, w http.ResponseWriter, r *http.Request) {