github.com/chain5j/chain5j-pkg@v1.0.7/collection/maps/treemap/v2/example/main.go (about) 1 package main 2 3 import ( 4 "fmt" 5 6 "github.com/chain5j/chain5j-pkg/collection/maps/treemap/v2" 7 ) 8 9 func main() { 10 tr := treemap.New[int, string]() 11 tr.Set(1, "World") 12 tr.Set(0, "Hello") 13 for it := tr.Iterator(); it.Valid(); it.Next() { 14 fmt.Println(it.Key(), it.Value()) 15 } 16 }