github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/examples/gno.land/r/x/map_delete/map_delete.gno (about) 1 package mapdelete 2 3 var mapus map[uint64]string = make(map[uint64]string) 4 5 func init() { 6 mapus[3] = "three" 7 mapus[5] = "five" 8 mapus[9] = "nine" 9 } 10 11 func DeleteMap(k uint64) { 12 delete(mapus, k) 13 } 14 15 func GetMap(k uint64) bool { 16 _, exist := mapus[k] 17 return exist 18 }