summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-27 08:59:39 +0300
committerPaul Buetow <paul@buetow.org>2026-04-27 08:59:39 +0300
commit30e63df03544b94ebc5fcb2a004d18a0d32a4247 (patch)
tree2933b6a790f01c215806b3efcb644f533c0c60cd /cmd
parentc6e0b5cc48dedb52477cb0060e6ebc8ca4f088f2 (diff)
processor: introduce PostBuilder registry to replace hardcoded switch
Replace the large, duplicate switch statements in planPost and commitPlan with a PostBuilder interface registered per file extension. - PostBuilder interface: Plan(srcPath, ext) (postPlan, error) and Commit(plan, postDir, id, now) (*post.Post, []string, error) - Per-type builders: txtBuilder, mdBuilder, imageBuilder, audioBuilder. - Each builder self-registers via init() into a map[string]PostBuilder. - Core processor loops are now extension-agnostic, satisfying OCP/DIP. - All existing tests pass.
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions