samples
[]struct{...}samples are shown on the root page: a valid number, a typo'd one, and a transposition — the two error classes Luhn is designed to catch.
- OID
- 0a6388…0624:4
samples details
Render
func(path string) stringRender renders the checker for gnoweb. Render("") / Render("/") -> usage + worked samples Render("/<digits>") -> verdict for that number
- OID
- 0a6388…0624:9
Render details
parseInput
func(path string) stringparseInput extracts the first path segment.
- OID
- 0a6388…0624:11
parseInput details
trimLast
func(s string) (string, bool)trimLast drops the final digit, ignoring separators, to recover the payload.
- OID
- 0a6388…0624:12
trimLast details
verdict
func(ok bool) string- OID
- 0a6388…0624:13