func ARouter() Router { return &router{ mountMap: make(map[string]*router), initMountPoint: not_init_mounter, mat: matcher.NewBFMatcher(), } }
// The error will be fatal. func GetRouter(MountPoint string) Router { if !CheckMountpointValidity(&MountPoint) { panic(INVALID_MOUNT_POINT) } return &router{ mountMap: make(map[string]*router), initMountPoint: MountPoint, mat: matcher.NewBFMatcher(), } }