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.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}