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

luhndemo/v0 package

Overview

Package luhndemo is a small gnoweb demo of the Luhn mod-10 checksum provided by the p/moul/x/daily/luhn(/p/moul/x/daily/luhn/v0) library: put a number in the path and it tells you whether the check digit is right, and what it should have been.

It contains no checksum logic of its own — validation, the check digit and the separator handling all come from the library. Read-only and stateless, so Render is fully deterministic.

Function

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render renders the checker for gnoweb.

Example
1Render("")        / Render("/") -> usage + worked samples
2Render("/<digits>")             -> verdict for that number

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/luhndemo/v0.Render()"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/moul/x/daily/luhndemo/v0, for example a function call with arguments.