Skip to content

リソースCloseのエラーハンドリング追加#228

Closed
massongit wants to merge 6 commits intomainfrom
add_close_2
Closed

リソースCloseのエラーハンドリング追加#228
massongit wants to merge 6 commits intomainfrom
add_close_2

Conversation

@massongit
Copy link
Copy Markdown
Member

@massongit massongit commented Dec 26, 2025

executeAndReadResponse関数とUploadFile関数にdefer Close処理を追加:

  • executeAndReadResponse: HTTPレスポンスBodyのClose処理
  • UploadFile: multipart.WriterのClose処理
  • 名前付き戻り値に変更しcloseErrでエラーシャドーイングを回避
  • リソースリークを防止し、Close時のエラーを適切に処理

🤖 Generated with Claude Code
#227 を前提としています。

@dev-hato-app dev-hato-app bot added this to task list Dec 26, 2025
@github-project-automation github-project-automation bot moved this to In Progress in task list Dec 26, 2025
@massongit massongit changed the base branch from main to separate_methods December 26, 2025 11:10
@massongit massongit force-pushed the add_close_2 branch 2 times, most recently from 0135132 to 0ba08b2 Compare December 26, 2025 13:24
@massongit massongit changed the title HTTPレスポンスBodyとmultipart.WriterのClose処理追加 リソースCloseのエラーハンドリング追加 Dec 26, 2025
massongit and others added 3 commits December 30, 2025 09:52
ParseLocationWithClient関数の循環的複雑度削減のため関数分割:
- parseCoordinates: 座標文字列の直接解析
- geocodePlace: ジオコーディングAPI呼び出し
- parseGeocodeResponse: ジオコーディングレスポンス解析

HTTPリクエスト処理の重複コード削減:
- executeAndReadResponse関数を新規追加
- geocodePlaceとmakeHTTPRequestで共通利用
- jscpdエラーを解消(重複率0.37% → 0%)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
ParseLocation関数とGenerateFileName関数を非公開メソッドエリアから
公開メソッドエリアに移動し、ファイル構成を整理
geocodePlace関数を、それが呼び出すヘルパー関数
(executeAndReadResponse、parseGeocodeResponse)の後に移動し、
関数の依存関係を明確化
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>
Base automatically changed from separate_methods to main January 24, 2026 14:03
@massongit massongit closed this Jan 24, 2026
@github-project-automation github-project-automation bot moved this from In Progress to Done in task list Jan 24, 2026
@massongit massongit deleted the add_close_2 branch January 24, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant