mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
fix: handle errcheck for Rows.Close and resp.Body.Close in sora code
This commit is contained in:
1 parent
7b3df5b807
commit
a4fdc1dc4b
2 files changed
+2
-2
No files matched your search
@@ -379,7 +379,7 @@ func (s *SoraTaskService) forwardGetToUpstream(
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("upstream request: %w", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
respBody, err := io.ReadAll(io.LimitReader(resp.Body, 256*1024))
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user