当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
2 Star 19 Fork 0

仓库镜像 / gin-gonic-gin
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test_helpers.go 428 Bytes
一键复制 编辑 原始数据 按行查看 历史
田欧 提交于 2018-08-12 10:12 . Attempt to fix #1462 (#1463)
// Copyright 2017 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package gin
import "net/http"
// CreateTestContext returns a fresh engine and context for testing purposes
func CreateTestContext(w http.ResponseWriter) (c *Context, r *Engine) {
r = New()
c = r.allocateContext()
c.reset()
c.writermem.reset(w)
return
}
Go
1
https://gitee.com/github-image/gin-gonic-gin.git
git@gitee.com:github-image/gin-gonic-gin.git
github-image
gin-gonic-gin
gin-gonic-gin
master

搜索帮助