Skip to content

Releases: pardnchiu/go-rest-client

v0.1.2

Choose a tag to compare

@pardnchiu pardnchiu released this 31 Jan 07:30

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.Requests assignment 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

Choose a tag to compare

@pardnchiu pardnchiu released this 31 Jan 06:29

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.RWMutex to protect TUI.Requests slice from concurrent read/write access
  • Add bounds check before accessing requests[0] in UpdateLeftView to prevent panic on empty request list
翻譯
  • 修正檔案監控 debounce timer 競爭條件,改用 mutex 保護的 time.AfterFunc
  • 新增 sync.RWMutex 保護 TUI.Requests slice 的並發讀寫存取
  • 在 UpdateLeftView 中加入邊界檢查,防止空請求列表時 panic

REFACTOR

  • Replace string concatenation with strings.Builder in showRequestDetail for better memory efficiency
  • Replace panic with fmt.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

Choose a tag to compare

@pardnchiu pardnchiu released this 30 Jan 19:58

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/ui package
  • Separate parser logic into internal/parser package
翻譯
  • 將 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