// GetRoute returns details for the routeID under the specified app.
17688
func (c *Client) GetRoute(appID string, routeID string) (*router.Route, error) {
	route := &router.Route{}
	return route, c.Get(fmt.Sprintf("/apps/%s/routes/%s", appID, routeID), route)
}
739785
func (r *Router) GET(pattern string, handler func(Context)) Route {
	return r.Handle("GET", pattern, wrap(handler))
}
1186105
func (c *Client) CreateRoute(appID string, route *router.Route) error {
	return c.Post(fmt.Sprintf("/apps/%s/routes", appID), route, route)
}
377582
func (client *Client) GetRoute(guid string) (Route, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetRouteRequest,
		URIParams:   Params{"route_guid": guid},
	})
	if err != nil {
		return Route{}, nil, err
	}

	var route Route
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &route,
	}

	err = client.connection.Make(request, &response)
	return route, response.Warnings, err
}
1064739
func (g *routeGroup) Get(path string, h ...Handler) {
	g.handle(GET, path, h)
}
802497
func (r RouteParams) Get(name string) string {
	vv, _, _ := r.GetOK(name)
	if len(vv) > 0 {
		return vv[len(vv)-1]
	}
	return ""
}
188269
func (res *Resource) addRoute(method string, route string) {
	res.Routes = append(res.Routes, fmt.Sprintf("%s - /%s%s", method, res.Type, route))
}
481020
func (m *Mux) GetRequestRoute(req *http.Request) string {
	cleanURL(&req.URL.Path)
	for _, r := range m.Routes[req.Method] {
		if r.Atts != 0 {
			if r.Atts&SUB != 0 {
				return r.Handler.(*Mux).GetRequestRoute(req)
			}
			if r.Match(req) {
				return r.Path
			}
		}
		if req.URL.Path == r.Path {
			return r.Path
		}
	}

	for _, s := range m.Routes[static] {
		if len(req.URL.Path) >= s.Size {
			if req.URL.Path[:s.Size] == s.Path {
				return s.Path
			}
		}
	}

	return "NotFound"
}
1369166
func (c *CodeStore) GetRoutes(airline string, source string, dest string) ([]*Route, error) {
	var airlineRoutes []*Route
	var sourceAirportRoutes []*Route
	var destinationAirportRoutes []*Route
	if airline != "" {
		airlineRoutes = c.AirlineToRoutes[strings.ToLower(airline)]
	}
	if source != "" {
		sourceAirportRoutes = c.SourceAirportToRoutes[strings.ToLower(source)]
	}
	if dest != "" {
		destinationAirportRoutes = c.DestinationAirportToRoutes[strings.ToLower(dest)]
	}
	return routesIntersection(airlineRoutes, sourceAirportRoutes, destinationAirportRoutes), nil
}
1306481
func (api *APIBuilder) Get(relativePath string, handlers ...context.Handler) *Route {
	return api.Handle(http.MethodGet, relativePath, handlers...)
}
1230251
func (r *Router) GET(path string, handlers ...HandlerFunc) {
	r.Handle("GET", path, handlers)
}
351749
func getRoutes() (routes []RouteEntry, err error) {
	output, err := exec.Command("/sbin/route", "-A", "inet").Output()
	if err != nil {
		return routes, err
	}

	columnMap := make(map[string]int)
	lines := strings.Split(strings.TrimSpace(string(output)), "\n")
	if len(lines) < 2 {
		return routes, fmt.Errorf("no routes found")
	}
	routes = make([]RouteEntry, len(lines)-2)
	for lineNum, line := range lines {
		line = strings.TrimSpace(line)
		switch {
		// skip first line
		case lineNum == 0:
			continue
		case lineNum == 1:
			for number, name := range strings.Fields(line) {
				columnMap[name] = number
			}
			continue
		default:
			fields := strings.Fields(line)
			metric, err := strconv.Atoi(fields[columnMap["Metric"]])
			if err != nil {
				return routes, err
			}
			ref, err := strconv.Atoi(fields[columnMap["Ref"]])
			if err != nil {
				return routes, err
			}
			use, err := strconv.Atoi(fields[columnMap["Use"]])
			if err != nil {
				return routes, err
			}
			routes[lineNum-2] = RouteEntry{
				Destination: fields[columnMap["Destination"]],
				Gateway:     fields[columnMap["Gateway"]],
				Genmask:     fields[columnMap["Genmask"]],
				Flags:       fields[columnMap["Flags"]],
				Metric:      metric,
				Ref:         ref,
				Use:         use,
				Iface:       fields[columnMap["Iface"]],
			}
		}
	}
	return routes, err
}
182288
func (fs RouteFileStore) Get(id string) (*Route, error) {
	file, err := os.Open(fs.Filename(id))
	if err != nil {
		return nil, err
	}
	route := new(Route)
	if err = unmarshal(file, route); err != nil {
		return nil, err
	}
	return route, nil
}
460078
func (c *Context) LookupRoute(request *http.Request) (*MatchedRoute, bool) {
	if route, ok := c.router.Lookup(request.Method, request.URL.EscapedPath()); ok {
		return route, ok
	}
	return nil, false
}
561281
func (r *Router) Get(path string, handler HandlerFunc) {
	r.Add(GET, path, handler)
}
865234
func ReadRoute(uri string) (route SteplibRoute, found bool) {
	routes, err := readRouteMap()
	if err != nil {
		return SteplibRoute{}, false
	}

	return routes.GetRoute(uri)
}
876043
func (s *Stack) GetRouteTable() []tcpip.Route {
	s.mu.Lock()
	defer s.mu.Unlock()
	return append([]tcpip.Route(nil), s.routeTable...)
}