Skip to content

v0.4.0

Choose a tag to compare

@pardnchiu pardnchiu released this 18 Jan 07:19
· 15 commits to master since this release

Update Log

Generated: 2026-01-18 08:00 (+00:00)
v0.3.0 → v0.4.0

Recommended Commit Message

refactor: Restructure compose commands with dispatcher pattern and add down command

翻譯 refactor: 重構 compose 命令為 dispatcher 模式並新增 down 命令

Summary

Refactored the compose command architecture from a single Up() method to a unified ComposeCMD() dispatcher pattern supporting multiple compose subcommands. Added down command implementation.

翻譯 重構 compose 命令架構,從單一 `Up()` 方法改為統一的 `ComposeCMD()` dispatcher 模式,支援多個 compose 子命令。新增 `down` 命令實作。

Changes

FEAT

  • Add down command for stopping and removing containers via podman compose down
  • Add Command field to PodmanArg struct for command routing
  • Prepare dispatcher skeleton for future commands: ps, logs, restart, exec, build
翻譯
  • 新增 down 命令,透過 podman compose down 停止並移除容器
  • 在 PodmanArg struct 新增 Command 欄位用於命令路由
  • 準備未來命令的 dispatcher 骨架:ps、logs、restart、exec、build

REFACTOR

  • Restructure compose handling from Up() to ComposeCMD() dispatcher pattern
  • Rename modifyComposeFile to ModifyComposeFile (exported method)
  • Move compose-related functions to composeCMD.go for better organization
  • Change CLI routing from explicit "up" case to default case for all compose commands
翻譯
  • 重構 compose 處理從 Up() 改為 ComposeCMD() dispatcher 模式
  • 將 modifyComposeFile 重新命名為 ModifyComposeFile(匯出方法)
  • 將 compose 相關函式移至 composeCMD.go 以改善組織結構
  • 將 CLI 路由從明確的 "up" case 改為 default case 以處理所有 compose 命令

REMOVE

  • Remove internal/command/up.go (functionality migrated to composeCMD.go)
翻譯
  • 移除 internal/command/up.go(功能已遷移至 composeCMD.go)

Files Changed

File Status Tag
cmd/cli/main.go Modified REFACTOR
internal/command/command.go Modified FEAT
internal/command/up.go Deleted REMOVE
internal/command/composeCMD.go Added REFACTOR

Generated by Claude Code