feat(cli): 根命令支持 --version 标志 #340
Loading…
Reference in New Issue
No description provided.
Delete Branch "Taoyouce/gitlink-cli:feat/root-version-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
成熟 CLI(gh/git/kubectl 等)均支持
<cli> --version快速查询版本;当前只有version子命令,gitlink-cli --version报unknown flag,脚本/Agent 探测版本时不便。变更内容
Version并用SetVersionTemplate复用既有 i18noutput.version文案,--version与version子命令输出完全一致(中英文均验证)。测试
gitlink-cli --version/version/--lang zh-CN --version输出一致;go test ./.../ vet / gofmt 全绿。