errcheck issues fixed (#28476)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5f48a359ca
Коммит
7e62197520
@@ -98,7 +98,6 @@ issues:
|
||||
channels/api4/permission.go|\
|
||||
channels/api4/plugin.go|\
|
||||
channels/api4/plugin_test.go|\
|
||||
channels/api4/post.go|\
|
||||
channels/api4/post_test.go|\
|
||||
channels/api4/preference_test.go|\
|
||||
channels/api4/reaction.go|\
|
||||
|
||||
@@ -1127,7 +1127,9 @@ func acknowledgePost(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 unacknowledgePost(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -1284,7 +1286,9 @@ func getFileInfosForPost(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
w.Header().Set("Cache-Control", "max-age=2592000, private")
|
||||
w.Header().Set(model.HeaderEtagServer, model.GetEtagForFileInfos(infos))
|
||||
w.Write(js)
|
||||
if _, err := w.Write(js); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
func getPostInfo(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -1305,7 +1309,9 @@ func getPostInfo(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 hasPermittedWranglerRole(c *Context, user *model.User, channelMember *model.ChannelMember) bool {
|
||||
|
||||
Ссылка в новой задаче
Block a user