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.34 Kb · 20 lines
 1package tally
 2
 3import "strconv"
 4
 5var count int
 6
 7// Bump increments the tally by one and returns the new count.
 8func Bump(cur realm) int {
 9	count++
10	return count
11}
12
13// Count returns the current tally.
14func Count() int {
15	return count
16}
17
18func Render(path string) string {
19	return "# Tally board\n\nCurrent count: " + strconv.Itoa(count) + "\n"
20}