mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
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:
parent
dddaf279ed
commit
7d337ac048
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user