refactor: replace gocraft with net/http routing - #14
Draft
Portals wants to merge 1 commit into
Draft
Conversation
Portals
marked this pull request as draft
September 7, 2026 18:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces gocraft/web with net/http.ServeMux and standard HTTP middleware while preserving the mail endpoint's authentication order, successful responses, trailing slash support, unsupported-method 404s, and authenticated OPTIONS behavior. Removes the gocraft dependency.
Mail services are now released even when sending panics. Request logs use the standard logger, debug panic responses are plain text instead of framework HTML, and standard ServeMux path normalization applies. Body-size enforcement and MIME header hardening remain separate later stages.
Validation:
go test -race ./...,golangci-lint run(zero issues), andgit diff --checkpassed. A fresh-context subagent independently reviewed commite6e4ded3522d18ea8693e0ff34178e6bac747a55, reran uncached race tests and lint, checked 108 additional routing/authentication/lifecycle cases, and returned OK.Stack: 5 of 6, based on #13 (
codex/04-golangci-lint). Review and merge in stack order.