Rendering layer for deals, stores, and categories with two output modes: styled terminal text using lipgloss (color-coded BOGO tags, price highlights, dim metadata, word-wrapped descriptions) and compact JSON for programmatic consumption. JSON output types (DealJSON, StoreJSON) normalize raw API fields — cleaning HTML entities, dereferencing nullable pointers, and computing derived fields like isBogo. Terminal output includes contextual headers with item counts and date ranges. Tests verify both rendering modes including HTML entity handling and nil safety.
7.0 KiB
7.0 KiB