MCPcopy
hub / github.com/gorilla/mux / getRouteTemplate

Function getRouteTemplate

mux_test.go:1775–1785  ·  view source on GitHub ↗

---------------------------------------------------------------------------- Helpers ----------------------------------------------------------------------------

(route *Route)

Source from the content-addressed store, hash-verified

1773// ----------------------------------------------------------------------------
1774
1775func getRouteTemplate(route *Route) string {
1776 host, err := route.GetHostTemplate()
1777 if err != nil {
1778 host = "none"
1779 }
1780 path, err := route.GetPathTemplate()
1781 if err != nil {
1782 path = "none"
1783 }
1784 return fmt.Sprintf("Host: %v, Path: %v", host, path)
1785}
1786
1787func testRoute(t *testing.T, test routeTest) {
1788 request := test.request

Callers 1

testRouteFunction · 0.85

Calls 2

GetHostTemplateMethod · 0.80
GetPathTemplateMethod · 0.80

Tested by

no test coverage detected