[Go-client] Fix the ineffectual assignment to err in decode (#10275)

Fixes: #10064

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2021-08-26 22:32:34 -07:00 committed by GitHub
parent 3b8f66cd1f
commit c3eb442900
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -421,6 +421,9 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
return
}
_, err = (*f).Write(b)
if err != nil {
return
}
_, err = (*f).Seek(0, io.SeekStart)
return
}