github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/examples/gno.land/r/demo/boards/z_12_d_filetest.gno (about) 1 // PKGPATH: gno.land/r/boards_test 2 package boards_test 3 4 // SEND: 200000000ugnot 5 6 import ( 7 "gno.land/r/demo/boards" 8 "gno.land/r/demo/users" 9 ) 10 11 func main() { 12 users.Register("", "gnouser", "my profile") 13 bid1 := boards.CreateBoard("test_board1") 14 pid := boards.CreateThread(bid1, "First Post (title)", "Body of the first post. (body)") 15 boards.CreateBoard("test_board2") 16 17 // create a repost to a non-existing destination board 18 rid := boards.CreateRepost(bid1, pid, "", "Check this out", 5) 19 println(rid) 20 println(boards.Render("test_board1")) 21 } 22 23 // Error: 24 // dst board not exist