-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: consolidate view packages to shared #16
Copy link
Copy link
Closed
Description
Summary
Consolidate the three separate view package implementations into the shared package.
Current State
There are THREE view implementations with overlapping functionality:
shared/view/view.go(210 lines) - hasTable(),JSON(),Plain(),Render(),Success(),Error(),Warning(),Info(),Truncate()tools/cfl/internal/view/view.go(227 lines) - similar methods plusRenderList(),RenderKeyValue(),ListMeta/ListResponsetypestools/jtk/internal/view/view.go(131 lines) - simpler version
The Truncate() function alone is duplicated in all three locations.
Proposed Changes
- Add cfl's
RenderList(),RenderKeyValue(), andListMeta/ListResponsetypes toshared/view/ - Delete
tools/cfl/internal/view/view.go - Delete
tools/jtk/internal/view/view.go - Update all imports to use
github.com/open-cli-collective/atlassian-go/view
Impact
~350 lines removed, 4 files changed
Naming
Standardize on View type name (currently cfl uses Renderer, jtk uses View).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels