Search Apps Documentation Source Content File Folder Download Copy Actions Download

counter.gno

0.21 Kb · 14 lines
 1package counter
 2
 3import "strconv"
 4
 5var count int
 6
 7func Increment(_ realm, change int) int {
 8	count += change
 9	return count
10}
11
12func Render(_ string) string {
13	return "Current counter value: " + strconv.Itoa(count)
14}