internal: fix always-true interface comparison

This CL corrects the following bug uncovered by staticcheck:

```
  internal/elements.go:148:6: this comparison is always true (SA4023)
    internal/elements.go:146:18: the lhs of the comparison gets its value from here and has a concrete type
```

Signed-off-by: Sebastien Binet <binet@cern.ch>
This commit is contained in:
Sebastien Binet 2023-12-15 14:49:18 +01:00 committed by Simon Ser
parent dddaf279ed
commit 7d337ac048

View File

@ -143,7 +143,10 @@ func (resp *Response) Err() error {
return nil return nil
} }
var err error = resp.Error var err error
if resp.Error != nil {
err = resp.Error
}
if resp.ResponseDescription != "" { if resp.ResponseDescription != "" {
if err != nil { if err != nil {
err = fmt.Errorf("%v (%w)", resp.ResponseDescription, err) err = fmt.Errorf("%v (%w)", resp.ResponseDescription, err)