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

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

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\nCount: " + strconv.Itoa(count) + "\n"
19}