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.

hello.gno

0.45 Kb · 18 lines
 1package hello
 2
 3import "strconv"
 4
 5var count int
 6
 7func Increment(cur realm) int {
 8    count++
 9    return count
10}
11
12func Render(path string) string {
13    return "# Hello World\n\n" +
14        "Welcome to my first realm!\n\n" +
15        "**Current count:** " + strconv.Itoa(count) + "\n\n" +
16        "[Click here to increase the count](https://gno.land/r/g1fcpugq0m27acmwr2vvg2y3wwe9k9cddksxj9c0/hello)\n\n" +
17        "(After you deploy, the button will work properly)"
18}