map_delete.gno

0.27 Kb ยท 18 lines
 1package mapdelete
 2
 3var mapus map[uint64]string = make(map[uint64]string)
 4
 5func init() {
 6	mapus[3] = "three"
 7	mapus[5] = "five"
 8	mapus[9] = "nine"
 9}
10
11func DeleteMap(_ realm, k uint64) {
12	delete(mapus, k)
13}
14
15func GetMap(k uint64) bool {
16	_, exist := mapus[k]
17	return exist
18}