func compileSchemes(route *Route) { if scheme, ok := route.GetRequirement(ROUTE_REQUIREMENTS_SCHEME); ok { schemes := strings.Split(config.ToString(scheme), "|") if len(schemes) > 0 { route.SetRequirement(ROUTE_REQUIREMENTS_SCHEME, config.TrimSpacesFromArray(schemes)) } } }
func compileMethods(route *Route) { if method, ok := route.GetRequirement(ROUTE_REQUIREMENTS_METHOD); ok { methods := strings.Split(config.ToString(method), "|") if len(methods) > 0 { route.SetRequirement(ROUTE_REQUIREMENTS_METHOD, config.TrimSpacesFromArray(methods)) } } }