Skip to content

pkg/scanner: replace go-bytesize with local formatter - #8

Open
thaJeztah wants to merge 2 commits into
DefangLabs:mainfrom
thaJeztah:rm_bytesize
Open

thaJeztah wants to merge 2 commits into
DefangLabs:mainfrom
thaJeztah:rm_bytesize

Conversation

@thaJeztah

Copy link
Copy Markdown

The scanner only uses go-bytesize to format file sizes for threshold
violations. Replace the dependency with a small local helper that formats
sizes using powers of 1024 and two decimal places.

This keeps the required behavior while avoiding a dependency on the broader
parsing and formatting functionality provided by go-bytesize.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The scanner only uses go-bytesize to format file sizes for threshold
violations. Replace the dependency with a small local helper that formats
sizes using powers of 1024 and two decimal places.

This keeps the required behavior while avoiding a dependency on the broader
parsing and formatting functionality provided by go-bytesize.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
Author

@defangdevs @lionello PTAL: 🤗

@defangdevs

Copy link
Copy Markdown

Thanks for the PR! The Test job failure here isn't caused by this change — main itself has been failing the same way since #5 added CI (tracked in #7, fix already up in #6 pending review/merge). Your bytesize-formatting diff looks unrelated to any of those test fixtures. Once #6 merges you should be able to rebase and get a clean run; will ping here if that lands.

@defangdevs defangdevs mentioned this pull request Sep 17, 2026
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