mirror of
https://github.com/labstack/echo.git
synced 2025-07-17 01:43:02 +02:00
Zhaojkun httperror message (#959)
* Change echo http error message * Add test case * Fixed test cases Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
staticRoutes = []Route{
|
||||
staticRoutes = []*Route{
|
||||
{"GET", "/", ""},
|
||||
{"GET", "/cmd.html", ""},
|
||||
{"GET", "/code.html", ""},
|
||||
@ -170,7 +170,7 @@ var (
|
||||
{"GET", "/progs/update.bash", ""},
|
||||
}
|
||||
|
||||
gitHubAPI = []Route{
|
||||
gitHubAPI = []*Route{
|
||||
// OAuth Authorizations
|
||||
{"GET", "/authorizations", ""},
|
||||
{"GET", "/authorizations/:id", ""},
|
||||
@ -433,7 +433,7 @@ var (
|
||||
{"DELETE", "/user/keys/:id", ""},
|
||||
}
|
||||
|
||||
parseAPI = []Route{
|
||||
parseAPI = []*Route{
|
||||
// Objects
|
||||
{"POST", "/1/classes/:className", ""},
|
||||
{"GET", "/1/classes/:className/:objectId", ""},
|
||||
@ -477,7 +477,7 @@ var (
|
||||
{"POST", "/1/functions", ""},
|
||||
}
|
||||
|
||||
googlePlusAPI = []Route{
|
||||
googlePlusAPI = []*Route{
|
||||
// People
|
||||
{"GET", "/people/:userId", ""},
|
||||
{"GET", "/people", ""},
|
||||
@ -839,7 +839,7 @@ func TestRouterStaticDynamicConflict(t *testing.T) {
|
||||
assert.Equal(t, 3, c.Get("c"))
|
||||
}
|
||||
|
||||
func testRouterAPI(t *testing.T, api []Route) {
|
||||
func testRouterAPI(t *testing.T, api []*Route) {
|
||||
e := New()
|
||||
r := e.router
|
||||
|
||||
@ -866,7 +866,7 @@ func TestRouterGitHubAPI(t *testing.T) {
|
||||
|
||||
// Issue #729
|
||||
func TestRouterParamAlias(t *testing.T) {
|
||||
api := []Route{
|
||||
api := []*Route{
|
||||
{GET, "/users/:userID/following", ""},
|
||||
{GET, "/users/:userID/followedBy", ""},
|
||||
{GET, "/users/:userID/follow", ""},
|
||||
@ -874,7 +874,7 @@ func TestRouterParamAlias(t *testing.T) {
|
||||
testRouterAPI(t, api)
|
||||
}
|
||||
|
||||
func benchmarkRouterRoutes(b *testing.B, routes []Route) {
|
||||
func benchmarkRouterRoutes(b *testing.B, routes []*Route) {
|
||||
e := New()
|
||||
r := e.router
|
||||
b.ReportAllocs()
|
||||
|
Reference in New Issue
Block a user