v0.2.1 Release Notes
Released
Generated: 2026-01-18 16:00 v0.2.0 → v0.2.1
Recommended Commit Message
refactor: Extract command parsing and utilities into internal packages
翻譯
refactor: 將命令解析與工具函式抽取至 internal packagesSummary
Restructure codebase by extracting command parsing logic and utility functions from cmd/cli/main.go into dedicated internal packages (internal/command, internal/utils) for better modularity and separation of concerns.
翻譯
重構程式碼結構,將命令解析邏輯與工具函式從 `cmd/cli/main.go` 抽取至專用的 internal packages(`internal/command`、`internal/utils`),提升模組化與關注點分離。Changes
REFACTOR
- Extract
PodmanArgstruct and command parsing logic tointernal/commandpackage - Move
New()(formerlyparseCommand()),parseArgs(),getLocalDir(),setRemoteDir()tointernal/command/command.go - Extract
CheckRelyPackages(),installPackage()tointernal/utils/checkRelyPackages.go - Extract common utilities
IsDir(),FileExist(),GetMAC(),CmdExec()tointernal/utils/utils.go - Simplify
cmd/cli/main.goto entry point only, removing unused imports (crypto/md5,encoding/hex,net,path/filepath,runtime,strings,os/exec)
翻譯
- 將
PodmanArgstruct 與命令解析邏輯抽取至internal/commandpackage - 將
New()(原parseCommand())、parseArgs()、getLocalDir()、setRemoteDir()移至internal/command/command.go - 將
CheckRelyPackages()、installPackage()抽取至internal/utils/checkRelyPackages.go - 將通用工具函式
IsDir()、FileExist()、GetMAC()、CmdExec()抽取至internal/utils/utils.go - 簡化
cmd/cli/main.go為純進入點,移除未使用的 imports(crypto/md5、encoding/hex、net、path/filepath、runtime、strings、os/exec)
Files Changed
| File | Status | Tag |
|---|---|---|
cmd/cli/main.go |
Modified | REFACTOR |
internal/command/command.go |
Added | REFACTOR |
internal/utils/utils.go |
Added | REFACTOR |
internal/utils/checkRelyPackages.go |
Added | REFACTOR |
Generated by Claude Code