counter.gno
0.27 Kb · 21 lines
1package counter
2
3import "strconv"
4
5var count int
6
7func Increment(_ realm) {
8 count++
9}
10
11func Decrement(_ realm) {
12 count--
13}
14
15func Reset(_ realm) {
16 count = 0
17}
18
19func Render(_ string) string {
20 return "# ruangnode counter\n\nCurrent count: **" + strconv.Itoa(count) + "**"
21}