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