Merged
Conversation
…; fix CI - TD-009: standardize MarkFlagRequired as sole required-flag mechanism; remove redundant manual if-empty checks from 19 commands - TD-011: prompt for client-secret interactively using term.ReadPassword instead of requiring it as a visible CLI flag - TD-012: warn about credential exposure in --debug flag description - TD-016: add global --output flag; PrintTable emits JSON when --output=json - TD-017: add --limit/--offset pagination flags to all 25 list commands - TD-018: encapsulate client cache in clientState struct; add resetClientState() - Remove vendor/ from git tracking; add to .gitignore - Fix CI: use go-version-file to match go.mod version instead of hardcoded 1.24.2, eliminating the covdata toolchain resolution failure
…files Add 23 new test files (111 passing test cases) covering list/get/create/ delete/update handlers across compute, network, database, container, schedule, storage, and management command files. Key changes: - cmd/mock_test.go: extend mock infrastructure with 16 new sub-client mocks, 6 with* builder functions, and resetCmdFlags() to prevent cobra flag state leakage between test runs - cmd/*_test.go: 23 new table-driven test files; create commands that pre-fetch resources (storage backup/restore, database backup) use fully wired mock trees - cmd/network.securitygroup.go, network.subnet.go: register missing --project-id flags required by GetProjectID - Fix nil pointer dereference on LocationResponse.Value in 22 locations across 18 command files (list formatters and get display code) - Fix nil pointer dereference on CreationDate.IsZero() in 17 locations across 10 command files - security.kms.go skipped: KMSClient is a concrete SDK type, cannot mock Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ards
AWK-generated nil guards in 5 cmd files wrapped pre-existing
'if X != nil && X.Value != ""' checks with a redundant inner
'if X != nil' block. Collapsed to the single richer outer guard.
Files: compute.cloudserver.go, network.elasticip.go, network.subnet.go,
network.vpc.go, network.vpntunnel.go
…helper functions Add msgCreated, msgCreatedAsync, msgUpdated, msgUpdatedAsync, msgDeleted, msgAction helpers to root.go. Replace all ~91 success fmt.Print* calls across 20 cmd files with consistent output. Fix one double-nil-check in container.containerregistry.go as a side effect.
- Credentials: replace misleading 'enter both when prompted' flow with
the correct pattern — --client-secret is prompted interactively with
echo disabled when omitted; --client-id must be passed on the CLI.
Added shell-history security note and CI/automation alternative.
- Debug mode: add security warning about credentials/tokens visible in
HTTP headers (TD-012).
- Output format: document global --output/-o flag (table/json, TD-016).
- Pagination: document --limit/--offset flags on all list commands (TD-017).
Files: README.md, docs/README.md, docs/getting-started.md,
docs/website/docs/installation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #39
Fixes #40
Fixes #41
Fixes #42
Fixes #46
Fixes #47
Fixes #48
Fixes #50
Fixes #51