Skip to content

refactor: remove redundant version subcommand - #21

Merged
ClayMav merged 1 commit into
mainfrom
refactor/remove-version-subcommand
Apr 24, 2026
Merged

refactor: remove redundant version subcommand#21
ClayMav merged 1 commit into
mainfrom
refactor/remove-version-subcommand

Conversation

@ClayMav

@ClayMav ClayMav commented Apr 24, 2026

Copy link
Copy Markdown
Member

Summary

  • wherobots version and wherobots --version were printing the same string. Drop the hand-written version subcommand and rely on Cobra's built-in --version flag (already wired up via root.Version = versionString).
  • Deletes internal/commands/version.go and removes the commands.AddVersionCommand(...) call in main.go. No other change.

Test plan

  • make build
  • make test — all green
  • go vet ./... clean
  • ./bin/wherobots --version still prints wherobots version dev (commit none, built unknown)
  • ./bin/wherobots version now reports unknown command "version" (as expected)

The `wherobots version` subcommand and the `--version` flag printed the
same string. Cobra's built-in `--version` (wired up via `root.Version`)
is sufficient, so drop the hand-written subcommand.
@ClayMav
ClayMav marked this pull request as ready for review April 24, 2026 18:52
@ClayMav
ClayMav requested a review from a team as a code owner April 24, 2026 18:52
@ClayMav
ClayMav requested a review from sfishel18 April 24, 2026 18:52
@ClayMav
ClayMav merged commit ce0dbf5 into main Apr 24, 2026
1 check passed
@ClayMav
ClayMav deleted the refactor/remove-version-subcommand branch April 24, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants