errcheck issues fixed (#28418)

This commit is contained in:
Arya Khochare
2024-10-04 17:51:38 +02:00
committed by GitHub
parent ac30b9d468
commit 0a92eb6363
2 changed files with 6 additions and 3 deletions
-1
View File
@@ -87,7 +87,6 @@ issues:
channels/api4/ip_filtering.go|\
channels/api4/ip_filtering_test.go|\
channels/api4/job_test.go|\
channels/api4/ldap.go|\
channels/api4/license.go|\
channels/api4/license_local.go|\
channels/api4/license_test.go|\
+6 -2
View File
@@ -140,7 +140,9 @@ func getLdapGroups(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
w.Write(b)
if _, err := w.Write(b); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func linkLdapGroup(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -240,7 +242,9 @@ func linkLdapGroup(c *Context, w http.ResponseWriter, r *http.Request) {
auditRec.Success()
w.WriteHeader(status)
w.Write(b)
if _, err := w.Write(b); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func unlinkLdapGroup(c *Context, w http.ResponseWriter, r *http.Request) {