groups.gno

0.38 Kb ยท 21 lines
 1package groups
 2
 3import (
 4	"regexp"
 5
 6	"gno.land/p/demo/avl"
 7)
 8
 9//----------------------------------------
10// Realm (package) state
11
12var (
13	gGroups       avl.Tree // id -> *Group
14	gGroupsCtr    int      // increments Group.id
15	gGroupsByName avl.Tree // name -> *Group
16)
17
18//----------------------------------------
19// Constants
20
21var reName = regexp.MustCompile(`^[a-z]+[_a-z0-9]{2,29}$`)