Releases: pardnchiu/go-rest-client
Releases · pardnchiu/go-rest-client
Release list
v0.1.2
v0.1.1 -> v0.1.2
Summary
Fix resource leak and race condition issues in HTTP request handling and file parsing.
翻譯
修正 HTTP 請求處理與檔案解析中的資源洩漏與競爭條件問題。Changes
FIX
- Add
defer resp.Body.Close()to prevent HTTP response body resource leak - Add mutex lock protection for
t.Requestsassignment to prevent race condition during concurrent file reload
翻譯
- 新增
defer resp.Body.Close()防止 HTTP response body 資源洩漏 - 新增 mutex lock 保護
t.Requests賦值,防止檔案重新載入時的並發競爭條件
Files Changed
| File | Status | Tag |
|---|---|---|
internal/ui/tui.go |
Modified | FIX |
internal/parser/parser.go |
Modified | FIX |
Generated by Claude Code
v0.1.1
v0.1.0 -> v0.1.1
Summary
Fix file watcher race conditions with proper mutex protection and refactor request detail rendering for better performance.
翻譯
修正檔案監控的競爭條件並加入適當的讀寫鎖保護,同時重構請求詳情渲染以提升效能。Changes
FIX
- Fix debounce timer race condition in file watcher by replacing shared timer with mutex-protected
time.AfterFunc - Add
sync.RWMutexto protectTUI.Requestsslice from concurrent read/write access - Add bounds check before accessing
requests[0]inUpdateLeftViewto prevent panic on empty request list
翻譯
- 修正檔案監控 debounce timer 競爭條件,改用 mutex 保護的
time.AfterFunc - 新增
sync.RWMutex保護TUI.Requestsslice 的並發讀寫存取 - 在
UpdateLeftView中加入邊界檢查,防止空請求列表時 panic
REFACTOR
- Replace string concatenation with
strings.BuilderinshowRequestDetailfor better memory efficiency - Replace
panicwithfmt.Fprintf+os.Exit(1)for TUI runtime error handling in main
翻譯
- 在
showRequestDetail中以strings.Builder取代字串串接以提升記憶體效率 - 在 main 中以
fmt.Fprintf+os.Exit(1)取代panic處理 TUI 執行錯誤
Files Changed
| File | Status | Tag |
|---|---|---|
cmd/tui/main.go |
Modified | REFACTOR |
internal/parser/parser.go |
Modified | FIX |
internal/ui/tui.go |
Modified | FIX, REFACTOR |
README.md |
Modified | DOC |
README.zh.md |
Modified | DOC |
cover.png |
Added | DOC |
test.http |
Modified | CHORE |
Generated by Claude Code
v0.1.0
v0.0.0 -> v0.1.0
Summary
Initial release of go-rest-client, a terminal-based REST API testing tool compatible with VSCode REST Client extension. Features include TUI interface, .http file parsing, file monitoring with auto-reload, SSE streaming support, and JSON auto-formatting.
翻譯
go-rest-client 初始版本發布,一個相容 VSCode REST Client 擴充功能的終端 REST API 測試工具。功能包含 TUI 介面、.http 檔案解析、檔案監控與自動重載、SSE 串流支援及 JSON 自動格式化。
Changes
FEAT
- Add .http file parsing with support for GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS methods
- Add TUI interface with split-panel layout (API list / response display)
- Add file monitoring with automatic reload on file changes
- Add CLI file path argument support
- Add keyboard navigation with Tab and arrow keys
- Add SSE (Server-Sent Events) real-time streaming display
- Add JSON response auto-formatting for improved readability
翻譯
- 新增 .http 檔案解析,支援 GET、POST、PUT、DELETE、PATCH、HEAD、OPTIONS 方法
- 新增 TUI 介面,採用分割面板佈局(API 清單 / 回應顯示)
- 新增檔案監控,檔案變更時自動重載
- 新增命令列檔案路徑參數支援
- 新增鍵盤導航,支援 Tab 和方向鍵
- 新增 SSE(Server-Sent Events)即時串流顯示
- 新增 JSON 回應自動格式化以提升可讀性
REFACTOR
- Extract TUI components into standalone
internal/uipackage - Separate parser logic into
internal/parserpackage
翻譯
- 將 TUI 元件抽取為獨立的
internal/ui套件 - 將解析邏輯分離至
internal/parser套件
CHORE
- Add fsnotify dependency for file watching
翻譯
- 新增 fsnotify 依賴套件用於檔案監控
Files Changed
| File | Status | Tag |
|---|---|---|
cmd/tui/main.go |
Modified | FEAT |
internal/ui/tui.go |
Added | FEAT |
internal/parser/parser.go |
Added | FEAT |
README.md |
Modified | DOC |
README.zh.md |
Added | DOC |
LICENSE |
Added | ADD |
test.http |
Added | ADD |
go.mod |
Modified | CHORE |
go.sum |
Modified | CHORE |
Generated by Claude Code