Summary
Move URL normalization logic to the shared package to eliminate duplication across both tools.
Current State
URL normalization is implemented in 3 places:
tools/jtk/internal/config/config.go - NormalizeURL() (lines 137-147)
tools/jtk/api/client.go - hasScheme(), trimTrailingSlash() (lines 70-80)
tools/cfl/internal/config/config.go - NormalizeURL() (lines 44-50)
Proposed Changes
- Create
shared/url/url.go with NormalizeURL() function
- Update both tools to import from shared
- Remove duplicate implementations
Impact
~30 lines removed, 3 files changed