-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: remove duplicate helper functions #21
Copy link
Copy link
Closed
Description
Summary
Remove duplicate utility functions that exist in multiple places, using the shared package versions instead.
Duplicated Functions
truncate()
Implemented in 3 places:
shared/view/view.golines 201-209 ✓ (keep this one)tools/cfl/internal/view/view.golines 218-226 (remove)tools/jtk/internal/cmd/issues/get.golines 99-104 (remove)
formatAssignee() / orDash()
tools/jtk/internal/cmd/issues/get.go:
formatAssignee()(lines 92-96) - defined but same logic is inline at line 54orDash()(lines 106-111) - utility for empty string handlingsafeString()(lines 113-120) - interface to string conversion
Proposed Changes
- Remove duplicate
truncate()implementations, useshared/view.Truncate() - Remove unused
formatAssignee()or use it consistently - Consider moving
orDash()andsafeString()to shared if used elsewhere
Impact
~40 lines removed
Depends On
- refactor: consolidate view packages to shared #16 (consolidate view packages) - removing view.go files will handle some of this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels