Commit fce611b
リソースCloseのエラーハンドリング追加 (#259)
* リソースCloseのエラーハンドリング追加
executeAndReadResponse関数とUploadFile関数にdefer Close処理を追加:
- executeAndReadResponse: HTTPレスポンスBodyのClose処理
- UploadFile: multipart.WriterのClose処理
- 名前付き戻り値に変更しcloseErrでエラーシャドーイングを回避
- リソースリークを防止し、Close時のエラーを適切に処理
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* body -> readCloser
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 611e9e8 commit fce611b
2 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
321 | 327 | | |
322 | 328 | | |
323 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
0 commit comments