🥅 Don't lint errcheck for conn.Close() of LDAP connection.

This commit is contained in:
Daniel Aloni 2023-07-10 17:24:07 +03:00
parent 0e289d024f
commit 95c638274b
2 changed files with 2 additions and 1 deletions

2
.gitignore vendored
View file

@ -80,7 +80,7 @@ media_store/
# golang workspaces # golang workspaces
go.work* go.work*
__debug_bin __debug_bin*
cmd/dendrite-monolith-server/dendrite-monolith-server cmd/dendrite-monolith-server/dendrite-monolith-server
build build

View file

@ -230,6 +230,7 @@ func (t *LoginTypePassword) authenticateLdap(username, password string) (bool, *
JSON: spec.Unknown("unable to connect to ldap: " + err.Error()), JSON: spec.Unknown("unable to connect to ldap: " + err.Error()),
} }
} }
// nolint: errcheck
defer conn.Close() defer conn.Close()
if t.Config.Ldap.AdminBindEnabled { if t.Config.Ldap.AdminBindEnabled {