1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00

Left over

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-01-28 23:56:09 -08:00
parent 688293b5ed
commit 57399453be
7 changed files with 88 additions and 0 deletions

BIN
_fixture/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,9 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Echo</title>
</head>
<body>
</body>
</html>

BIN
_fixture/images/walle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

9
_fixture/index.html Normal file
View File

@ -0,0 +1,9 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Echo</title>
</head>
<body>
</body>
</html>

27
glide.lock generated Normal file
View File

@ -0,0 +1,27 @@
hash: 57f60c6f58e40de3ea10123144095336abe2a4024e256feea9721e4e89ad38be
updated: 2016-01-28T19:14:46.587206305-08:00
imports:
- name: github.com/labstack/gommon
version: 25c3ce2d2abe76d8dd935305f1a8c1063dd3aac3
subpackages:
- /color
- log
- name: github.com/mattn/go-colorable
version: 4af63d73f5bea08b682ad2cd198b1e607afd6be0
- name: github.com/mattn/go-isatty
version: 56b76bdf51f7708750eac80fa38b952bb9f32639
- name: github.com/valyala/fasthttp
version: 359b3a1dd826fd4f7a4375f7072e7314ddad2400
- name: golang.org/x/crypto
version: 1f22c0103821b9390939b6776727195525381532
repo: https://golang.org/x/crypto
- name: golang.org/x/net
version: 04b9de9b512f58addf28c9853d50ebef61c3953e
subpackages:
- /context
- http2
- websocket
- name: golang.org/x/text
version: 6d3c22c4525a4da167968fa2479be5524d2e8bd0
repo: https://golang.org/x/text
devImports: []

12
glide.yaml Normal file
View File

@ -0,0 +1,12 @@
package: github.com/labstack/echo
import:
- package: github.com/labstack/gommon
subpackages:
- /color
- log
- package: github.com/valyala/fasthttp
- package: golang.org/x/net
subpackages:
- /context
- http2
- websocket

31
test/http.go Normal file
View File

@ -0,0 +1,31 @@
package test
import (
"bytes"
"io"
"net/http"
"net/http/httptest"
"github.com/labstack/echo/engine"
"github.com/labstack/echo/engine/standard"
)
type (
ResponseRecorder struct {
engine.Response
Body *bytes.Buffer
}
)
func NewRequest(method, url string, body io.Reader) engine.Request {
r, _ := http.NewRequest(method, url, body)
return standard.NewRequest(r)
}
func NewResponseRecorder() *ResponseRecorder {
r := httptest.NewRecorder()
return &ResponseRecorder{
Response: standard.NewResponse(r),
Body: r.Body,
}
}