rfc822: remove unconditional parser diagnostics, unused bookkeeping, and stale commented implementations #12
Labels
No labels
nagonag
nagonag/ignore
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
heiko/mailseal#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The RFC 822 package retains debugging and dead bookkeeping that obscure the already complex parser/canonicalizer:
internal/rfc822/parser.gologsXXX: <offset>wheneverp.offset > 0, even when debug tracing is disabled.internal/rfc822/message.gomaintainsposbut never reads it.internal/rfc822/normalize.gocontains large blocks of commented-out implementation alongside the active regular-expression implementation.For an email filter, unexpected stderr output may leak fragments/state into MTA logs and makes diagnostics noisy.
Checklist: #2 (remove unnecessary code/nesting and keep the happy path clear).
Proposed fix
posvariable.AddHeaderswrapping claims with actual behavior.Acceptance criteria
Reviewed against
948b7a9onmaster(Go 1.26.2).Parser diagnostics/dead code cleanup and corrected AddHeaders documentation are complete.
Closing commit:
98a18c7e2be0