Skip to content

refactor(products): unify product command registration#102

Merged
Ali1213 merged 1 commit into
ucloud:masterfrom
Episkey-G:refactor-product-migration
Jul 7, 2026
Merged

refactor(products): unify product command registration#102
Ali1213 merged 1 commit into
ucloud:masterfrom
Episkey-G:refactor-product-migration

Conversation

@Episkey-G

Copy link
Copy Markdown
Contributor

Summary

  • unify cli.Product.NewCommand(ctx) to return []*cobra.Command, allowing one real product domain to own multiple top-level CLI commands
  • consolidate migrated command products into real product domains: eip/firewall under unet, and image under uhost
  • refresh product registration, command/completion goldens, onboarding example, and add registration coverage for multi-command products
  • normalize empty static completion golden rows to avoid trailing whitespace in newly generated snapshots

Validation

  • go test ./cmd -run TestUhost -count=1 -timeout=30m
  • go test ./... -skip TestUhost -count=1
  • go test ./hack/snapshot -count=1
  • go run ./hack/check-product
  • go test ./cmd -run 'TestRegisteredProductsUseRealProductDomains|TestAddProductCommandsRegistersAllProductCommands' -count=1
  • git diff --cached --check

Return product commands as a slice so one product can own multiple top-level commands.

Consolidate migrated eip/firewall under UNet and image under UHost, refresh product goldens, and add registration coverage.
@Episkey-G Episkey-G closed this Jul 7, 2026
@Episkey-G Episkey-G reopened this Jul 7, 2026
@Ali1213 Ali1213 merged commit 8728012 into ucloud:master Jul 7, 2026
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants