Repository navigation
Tags
Tags
handbook: add an argon2id example to chapter 06 Recipe 006 gains Example F: argon2id.New() as a memory-hard auth.PasswordHasher, showing the hasher interface is pluggable and that argon2id is the recommended default for a new system. Chapter 06 gets the example, report line and takeaway in both languages.
handbook: add broadcast-hub and graceful-close examples to chapter 09 Recipe 009 gains Example D (a guarded connection set with a broadcast fan-out: one client's message reaches every client) and Example E (CloseWithStatus plus IsCloseError for a clean, code-carrying shutdown). Chapter 09 gets both examples, report and takeaways in both languages, plus two race-clean tests.
handbook: add slug-validation and acronym examples to chapter 07 Recipe 007 gains Example D (slug.IsValid to reject a malformed slug from a request path) and Example E (scs.WithAcronyms keeps API and ID upper-case where plain scs title-cases them). Chapter 07 gets both examples, report and takeaways in both languages, plus two tests.
handbook: add error-collection and clean-then-check examples to chapt… …er 03 Recipe 003 gains Example D (validate every field and return a map of all failures at once) and Example E (normalize with norm, then validate with is: a card via Luhn and an IBAN via checksum). Chapter 03 gets both examples, report and takeaways in both languages, plus two tests.
PreviousNext