Skip to content

fix: resolve TD-002, TD-013, TD-014 tech debt items#54

Merged
aru-amedeo merged 1 commit intomainfrom
feat/deb-tech
Apr 11, 2026
Merged

fix: resolve TD-002, TD-013, TD-014 tech debt items#54
aru-amedeo merged 1 commit intomainfrom
feat/deb-tech

Conversation

@aru-amedeo
Copy link
Copy Markdown
Collaborator

@aru-amedeo aru-amedeo commented Apr 11, 2026

ID Summary
TD-001 All Run handlers converted to RunE; SilenceUsage: true; fmtAPIError helper in root.go
TD-002 Nil guards added for LocationResponse, Metadata.ID, Metadata.Name in all list/create/update responses
TD-003 Errors propagated via return fmt.Errorf(...) instead of printing to stdout
TD-004 Flag read errors checked via RunE return paths
TD-005 confirmDelete() helper in root.go detects non-interactive stdin before prompting
TD-006 newCtx() helper in root.go applies 30-second timeout to all SDK calls
TD-007 getContextFilePath returns (string, error) instead of silently falling back to CWD
TD-008 YAML unmarshal errors wrapped with user-friendly messages in LoadConfig and LoadContext
TD-013 Args: cobra.NoArgs added to all create and list commands that take no positional arguments
TD-014 cmd/constants.go created with StateInCreation, DateLayout, FilePermConfig, FilePermDirAll; all magic strings replaced

Fixes #31
Fixes #32
Fixes #33
Fixes #34
Fixes #35
Fixes #36
Fixes #37
Fixes #38
Fixes #43
Fixes #44

  - TD-002: nil-guard all LocationResponse.Value, Metadata.ID, and
    Metadata.Name accesses in securitygroup, vpc, subnet, elasticip,
    loadbalancer, containerregistry, and snapshot commands
  - TD-013: add cobra.NoArgs to 28 create/list commands across 17 files
  - TD-014: introduce cmd/constants.go (StateInCreation, DateLayout,
    FilePermConfig, FilePermDirAll); replace all magic strings and
    date format literals across 25+ files
@aru-amedeo aru-amedeo merged commit 03bafe2 into main Apr 11, 2026
0 of 6 checks passed
@aru-amedeo aru-amedeo mentioned this pull request Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment