Skip to content Search Apps Documentation Source Content 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.

z2_filetest.gno

0.74 Kb · 37 lines
 1// PKGPATH: gno.land/r/nym-moultest123/main
 2
 3package main
 4
 5import (
 6	"testing"
 7
 8	"gno.land/r/nym-moultest123/home/v0"
 9)
10
11func main(cur realm) {
12	testing.SetRealm(testing.NewUserRealm("g1manfred47kzduec920z88wfr64ylksmdcedlf5"))
13	home.AddNewTodo(cross(cur), "aaa")
14	home.AddNewTodo(cross(cur), "bbb")
15	home.AddNewTodo(cross(cur), "ccc")
16	home.AddNewTodo(cross(cur), "ddd")
17	home.AddNewTodo(cross(cur), "eee")
18	home.UpdateStatus(cross(cur), "Lorem Ipsum")
19	home.DeleteTodo(cross(cur), 3)
20	println(home.Render(""))
21}
22
23// Output:
24// # Manfred's (gn)home Dashboard
25//
26// ## Meme
27// ![](https://i.imgflip.com/7ze8dc.jpg)
28//
29// ## Status
30// Lorem Ipsum
31//
32// ## Personal ToDo List
33// - [ ] fill this todo list...
34// - [ ] aaa
35// - [ ] bbb
36// - [ ] ddd
37// - [ ] eee