Skip to content

usage module: cosmetic follow-ups from review of #43 #45

Description

@chmmou

Bundled Nice-to-have findings from the post-merge review of #43 (usage read module). Each item is non-blocking; ship at your convenience.

  • internal/usage/usage.go:24-33Space struct keeps both UsedWebspace (the sum) and the four sub-buckets without a doc note that the sum equals the buckets. Add a one-liner so future readers don't double-count.
  • internal/usage/usage.go:55-65Traffic.Day == 0 is overloaded (summary row vs. literal day-zero, the latter never occurs). Add a (t Traffic) IsSummary() bool helper to make caller intent explicit.
  • internal/cli/usage.go:80-84--year / --month accept any int; out-of-range values are only rejected by KAS after a roundtrip. Pre-validate month ∈ 1..12 and a plausible year range for faster feedback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/apiKAS-API endpoint wrappers (domain modules)enhancementNew feature or request

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions