Skip to content

Add kit domain layer for 36Kr#1

Open
tamnd wants to merge 1 commit into
mainfrom
feat/kit-domain
Open

Add kit domain layer for 36Kr#1
tamnd wants to merge 1 commit into
mainfrom
feat/kit-domain

Conversation

@tamnd

@tamnd tamnd commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire the existing kr36 package into the any-cli/kit framework
  • Add domain.go with Domain struct, Register (article resolver + news list op), newClient factory, and Classify/Locate URI helpers
  • Add domain_test.go with offline tests for DomainInfo, Classify, Locate, and host wiring (Mint + ResolveOn round-trip)
  • Update types.go to add ID field and kit/table struct tags to Article
  • Update kr36.go to add Host constant, populate Article.ID from the URL, and strip feed-tracking query params from the URL field
  • Add github.com/tamnd/any-cli v0.2.0 dependency

Test plan

  • All 9 tests pass: go test ./kr36/...
  • Build succeeds: go build ./...
  • kr36 news lists articles from the RSS feed

Wires the existing kr36 package into the any-cli/kit framework so the
binary and a multi-domain host share one source of truth:

- domain.go: Domain struct, Register (article resolver + news list op),
  newClient factory, Classify/Locate URI helpers
- domain_test.go: offline tests for DomainInfo, Classify, Locate, host
  wiring (Mint + ResolveOn round-trip)
- types.go: add ID field and kit/table struct tags to Article
- kr36.go: add Host constant, populate Article.ID from URL, strip
  feed-tracking query params from the URL field
- go.mod/go.sum: add github.com/tamnd/any-cli v0.2.0

All 9 tests pass (5 existing + 4 new domain tests).
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