Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 state

Back to all declarations

samples

[]struct{...} (len=4)

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.

Open
OID
08d729…25ad:4
samples details (len=4)

+4 more Inspect slice

Render

func(path string) string

Render renders the checker for gnoweb. Render("") / Render("/") -> usage + worked samples Render("/<digits>") -> verdict for that number

Open
OID
08d729…25ad:9
Render details

Inspect func

parseInput

func(path string) string

parseInput extracts the first path segment.

Open
OID
08d729…25ad:11
parseInput details

Inspect func

trimLast

func(s string) (string, bool)

trimLast drops the final digit, ignoring separators, to recover the payload.

Open
OID
08d729…25ad:12
trimLast details

Inspect func
samples : []struct{...} (len=4) Inspect
Render : func(path string) string Inspect
parseInput : func(path string) string Inspect
trimLast : func(s string) (string, bool) Inspect
verdict : func(ok bool) string Inspect