Пример #1
0
func ARouter() Router {
	return &router{
		mountMap:       make(map[string]*router),
		initMountPoint: not_init_mounter,
		mat:            matcher.NewBFMatcher(),
	}
}
Пример #2
0
// 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(),
	}
}