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

z_1_filetest.gno

0.35 Kb · 23 lines
 1// PKGPATH: gno.land/r/test
 2package test
 3
 4import (
 5	"gno.land/p/nt/avl/v0"
 6)
 7
 8var node *avl.Node
 9
10func init() {
11	node = avl.NewNode("key0", "value0")
12	node, _ = node.Set("key1", "value1")
13}
14
15func main(cur realm) {
16	var updated bool
17	node, updated = node.Set("key2", "value2")
18	// println(node, updated)
19	println(updated, node.Size())
20}
21
22// Output:
23// false 3