Ports Python czech_utils.normalize to Go as internal/domain/czech.Normalize — first M2 (pure-domain) task.
NFKD via golang.org/x/text/unicode/norm, drops unicode.Mn only (matches Python unicodedata.combining() semantics, which returns 0 for Mc/Me), then strings.ToLower.
Adds golang.org/x/text v0.36.0 — first external Go dep.
Test plan
go build ./... clean
go test -race ./... green (13-case table-driven test in normalize_test.go)
golangci-lint run clean (gofumpt-formatted)
All test inputs spot-checked against the Python implementation (PYTHONPATH=scripts:. python -c 'from czech_utils import normalize; ...') before locking the table
## Summary
- Ports Python `czech_utils.normalize` to Go as `internal/domain/czech.Normalize` — first M2 (pure-domain) task.
- NFKD via `golang.org/x/text/unicode/norm`, drops `unicode.Mn` only (matches Python `unicodedata.combining()` semantics, which returns 0 for Mc/Me), then `strings.ToLower`.
- Adds `golang.org/x/text v0.36.0` — first external Go dep.
## Test plan
- [x] `go build ./...` clean
- [x] `go test -race ./...` green (13-case table-driven test in `normalize_test.go`)
- [x] `golangci-lint run` clean (gofumpt-formatted)
- [x] All test inputs spot-checked against the Python implementation (`PYTHONPATH=scripts:. python -c 'from czech_utils import normalize; ...'`) before locking the table
## Notes
- Plan file: [docs/plans/2026-05-05-2204-go-rewrite-m2-1-czech-normalize.md](../src/branch/feat/m2-1-czech-normalize/docs/plans/2026-05-05-2204-go-rewrite-m2-1-czech-normalize.md)
- Parity-fixture wiring deferred to M3.1/M3.2; will retroactively cover this function once the Tier-1 runner lands.
- Followup after merge: tick M2.1 in progress tracker with commit SHA, add CHANGELOG entry.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Feature work now goes on feat/<slug> branches; Claude pushes and prints
the Gitea compare URL for the user to open the MR. Exceptions documented
for small fixes and typo tweaks.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds internal/domain/czech.Normalize, the first pure-domain function in
the Go rewrite (M2 milestone). Matches Python czech_utils.normalize byte-
for-byte: NFKD decompose via golang.org/x/text/unicode/norm, drop Mn-
category combining marks (unicode.Mn, not IsMark, to match Python's
unicodedata.combining() semantics), then strings.ToLower.
Includes 13-case table-driven test; all inputs spot-checked against the
Python implementation before locking. Adds golang.org/x/text v0.36.0 as
first external dependency.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr
merged commit 20ade6de3e into main2026-05-05 23:26:56 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
czech_utils.normalizeto Go asinternal/domain/czech.Normalize— first M2 (pure-domain) task.golang.org/x/text/unicode/norm, dropsunicode.Mnonly (matches Pythonunicodedata.combining()semantics, which returns 0 for Mc/Me), thenstrings.ToLower.golang.org/x/text v0.36.0— first external Go dep.Test plan
go build ./...cleango test -race ./...green (13-case table-driven test innormalize_test.go)golangci-lint runclean (gofumpt-formatted)PYTHONPATH=scripts:. python -c 'from czech_utils import normalize; ...') before locking the tableNotes
🤖 Generated with Claude Code