Bug: Incorrect fmt verb causes garbled Idle Days output in resource table

Open Beginner friendly
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
aws, go
Domain
cli, cloud

Research direction

Open internal/ui/table.go and inspect the scan results table row format for the Idle Days column. Run aws-ghost scan --only ebs, ideally with an unattached EBS volume, and verify that Idle Days renders as a number without formatting artifacts.

Written by the indexing model from the issue text.

Description

What this fixes

Resolves a fmt.Sprintf verb mismatch in internal/ui/table.go that caused garbled output in the "Idle Days" column of the scan results table.

Before:

💾 ebs vol-xxxxxxxxxxxxx us-west-1 $8.00 %!s(int=0 ) %!d(MISSING)

After:

💾 ebs vol-xxxxxxxxxxxxx us-west-1 $8.00 0

Root cause

r.IdleDays is an int, but the row string used %-*s (string verb) instead of %-*d (int verb), leaving a dangling unmatched %d verb.

Change

- "  %s %-*s %-*s %-*s %s %-*s %d",
+ "  %s %-*s %-*s %-*s %s %-*d",

Testing

Verified locally by creating an unattached EBS volume and running aws-ghost scan --only ebs before and after the fix — output is now clean with no formatting artifacts.

Dominant language
Go
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.