feeds

A Go library for generating RSS, Atom, and JSON feeds from a single, format-agnostic Feed model.

Library
Go
vv1.2.0
816 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
44 /100 Fair
Development Activity 0
Maintenance 20
Community 76
Maturity 60
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
64 /100 Good
Architecture 70
Code Quality 75
Innovation 55
Learning Curve 55

gorilla/feeds is a lightweight Go library for building syndication feeds. It defines a single generic Feed and Item model that can be rendered into RSS 2.0, Atom 1.0, or JSON Feed 1.1 output without requiring separate data structures for each format. Applications populate one Feed struct with titles, links, authors, and items, then call ToRss, ToAtom, or ToJSON to get a spec-compliant string, or use the Write* variants to stream output directly to an io.Writer.

Beyond the generic model, feeds exposes the underlying AtomFeed, RssFeed, and JSONFeed types so callers needing spec-specific fields — a custom generator tag, a JSON Feed hub, or an RSS text input element — can build the object and then customize it before marshaling. A small uuid helper backs automatic id generation for Atom entries that lack an explicit id or link-derived tag.

What You Get

  • Format-agnostic Feed/Item model - one struct populates Title, Link, Author, Description, and Items, then renders to RSS, Atom, or JSON without duplicating data.
  • Three renderers built in - ToRss, ToAtom, and ToJSON (plus WriteRss/WriteAtom/WriteJSON for streaming to an io.Writer) cover RSS 2.0, Atom 1.0, and JSON Feed 1.1.
  • Escape hatch to spec-specific types - AtomFeed, RssFeed, and JSONFeed structs are exported so you can set fields the generic model doesn’t cover before marshaling.
  • Automatic Atom id generation - entries without an explicit Id get one derived from the item’s link and date, or a v4 UUID as a fallback.

Common Use Cases

  • Blog and CMS feed endpoints - render /feed.xml, /feed.atom, and /feed.json from the same list of posts.
  • Podcast and changelog feeds - publish RSS/Atom feeds for release notes or episodes with custom enclosure and GUID handling.
  • Aggregator and API output - services that ingest many sources and need to re-publish a normalized feed in multiple syndication formats.

Under The Hood

Architecture gorilla/feeds centers on a single generic Feed/Item model (feed.go) that format-specific adapters wrap: Atom{*Feed}, Rss{*Feed}, and JSON{*Feed} each embed the base struct and implement a FeedXml()/JSONFeed() method that transforms it into that spec’s own struct tree (AtomFeed, RssFeed, JSONFeed), which is then marshaled by the shared ToXML/WriteXML helpers or, for JSON, its own ToJSON/WriteJSON. A small XmlFeed interface is the only abstraction point; there’s no registry or plugin mechanism, so a fourth output format would mean adding another file that repeats the same wrap-and-transform shape as atom.go/rss.go/json.go. uuid.go is a self-contained UUID v4 generator used only to backfill Atom entry ids when no link/date is available to derive one.

Tech Stack Runtime code is pure standard library — encoding/xml, encoding/json, net/url, time, sort, and crypto/rand — with the only go.mod dependency (github.com/kr/pretty, plus its transitive kr/text/go-internal) used exclusively in tests for struct diffing. There’s no build step beyond go build/go test; the Makefile wraps golangci-lint, gosec, and govulncheck, and GitHub Actions runs the test suite across Go 1.20/1.21 on Linux, macOS, and Windows alongside separate lint and security-scan workflows, uploading coverage to Codecov.

Code Quality feed_test.go and consume_test.go (roughly 1,000 lines combined) round-trip a populated Feed through ToRss/ToAtom/ToJSON and back through XML/JSON unmarshaling to assert field-level fidelity, plus a dedicated UUID-format test. Error handling is idiomatic Go — explicit error returns from the marshal paths, with a single panic only on an unrecoverable crypto/rand failure in NewUUID. Naming follows standard Go convention throughout, and CI enforces golangci-lint, gosec, and govulncheck on every push and PR.

API Design Most minimal Go feed libraries stop at RSS and Atom or make callers populate a format-specific struct directly; feeds keeps one generic model as the primary interface while still exposing the full AtomFeed/RssFeed/JSONFeed types as an escape hatch for spec-specific fields the generic model doesn’t cover. Its JSON Feed 1.1 support is unusually complete for the ecosystem, including the authors array with deprecated single-author back-compat and attachment duration_in_seconds marshaling via custom MarshalJSON/UnmarshalJSON.

Used by 5 apps in this directory

Go
83%
MIT

Gitea

Developer Tools · Devops · Project Management

58,194

Self-hosted DevOps in a single Go binary — Git hosting, GitHub Actions-compatible CI/CD, and 30+ package registries without any SaaS dependency.

View details
93
Repo Health
79
Technical
64
Dependency
Built with
Go 83%
Updated 4 days ago
Go
42%
AGPL 3.0

listmonk

Blogging · Marketing

23,600

High-performance, self-hosted newsletter and mailing list manager packaged as a single binary with built-in analytics, transactional messaging, and multi-channel delivery.

View details
83
Repo Health
74
Technical
67
Dependency
Built with
Go 42%
Vue 24%
JavaScript 19%
Updated 1 weeks ago
Go
51%
MIT

memos

Note Taking

63,382

Open-source, self-hosted note-taking built for quick capture — Markdown-native, lightweight, and fully yours.

View details
91
Repo Health
78
Technical
65
Dependency
Built with
Go 51%
TypeScript 48%
Updated 5 days ago
Go
66%
AGPL 3.0

Vikunja

Project Management

5,533

Self-hosted task management with natural-language quick-add, multiple views, and a fully documented REST API — your tasks, your infrastructure, zero lock-in.

View details
86
Repo Health
81
Technical
68
Dependency
Built with
Go 66%
TypeScript 22%
Vue 10%
Updated 4 days ago
Go
65%
AGPL 3.0

WriteFreely

Blogging · Social Media

5,258

A clean, Markdown-based publishing platform for writers, with built-in ActivityPub federation for connecting to the wider fediverse.

View details
88
Repo Health
63
Technical
72
Dependency
Built with
Go 65%
Go Template 23%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers