Mercurial > gemma
changeset 5612:a9bcaac49a7e erdms2
Beware of nil interfaces.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 07 Nov 2022 21:03:32 +0100 |
parents | 8062c4a05ad9 |
children | 0abc65720804 |
files | pkg/soap/soap.go |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/soap/soap.go Mon Oct 31 19:06:52 2022 +0100 +++ b/pkg/soap/soap.go Mon Nov 07 21:03:32 2022 +0100 @@ -110,7 +110,9 @@ } func (ba *BasicAuth) AddAuth(request *http.Request) { - request.SetBasicAuth(ba.Login, ba.Password) + if ba != nil { + request.SetBasicAuth(ba.Login, ba.Password) + } } type SOAPClient struct {