Skip to content

add technews command, Section.Slug, FeedURL, and 6 more tests#1

Open
tamnd wants to merge 1 commit into
mainfrom
feat/pr1-cacm-rss
Open

add technews command, Section.Slug, FeedURL, and 6 more tests#1
tamnd wants to merge 1 commit into
mainfrom
feat/pr1-cacm-rss

Conversation

@tamnd

@tamnd tamnd commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Adds the technews subcommand and several related improvements to the existing
CACM feed implementation.

Changes

  • cacm technews -- fetches ACM TechNews at https://technews.acm.org/feed/
    (a separate WordPress installation on a different base domain); uses the new
    FeedURL method with an absolute URL rather than a relative path
  • Section.Slug -- new field matching the subcommand name (top, blogs,
    magazine, technews); knownSections expands from 3 to 4 entries with
    proper Name/Slug separation
  • FeedURL(ctx, absURL, limit) -- new Client method for feeds whose host
    differs from cfg.BaseURL; Feed now delegates to FeedURL
  • 16 test cases total (was 10): new tests cover FeedURL, FeedLimitZero,
    RSSAuthorFallback, HTMLEntities, AtomFallbackURL, AtomUpdatedFallback

Test plan

  • go build ./... passes
  • go test -race -count=1 ./... passes (16 tests, all offline)
  • go vet ./... passes
  • cacm sections shows 4 rows including technews with correct URL
  • cacm technews -n 3 fetches and renders items from technews.acm.org

- cacm technews: fetches ACM TechNews at technews.acm.org/feed/ via FeedURL
  (absolute URL path, different base domain from the other three feeds)
- Section: add Slug field matching the subcommand name (top/blogs/magazine/technews)
- knownSections: expand from 3 to 4 entries with proper Name/Slug separation
- cacm.go: add FeedURL(ctx, absURL, limit) so technews can use its own host;
  Feed now delegates to FeedURL
- tests: 16 total (was 10); new cases cover FeedURL, FeedLimitZero,
  RSSAuthorFallback, HTMLEntities, AtomFallbackURL, AtomUpdatedFallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant