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

tally.gno

0.30 Kb · 19 lines
 1package tally
 2
 3import "strconv"
 4
 5var count int
 6
 7// Bump adds one to the tally. Anyone may call it.
 8func Bump(cur realm) {
 9	count++
10}
11
12// Count returns the current tally.
13func Count() int {
14	return count
15}
16
17func Render(_ string) string {
18	return "# Tally board\n\nCurrent count: " + strconv.Itoa(count) + "\n"
19}