1 Star 1 Fork 2

kristas / booting-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
param_adapter.go 467 Bytes
一键复制 编辑 原始数据 按行查看 历史
kristas 提交于 2021-10-19 09:52 . !3merge v1.4.1
package gin_plugin
import (
"github.com/gin-gonic/gin"
"net/http"
)
type paramAdapter struct {
c *gin.Context
}
func (e *paramAdapter) GetStringFromPath(name string) (string, error) {
return e.c.Param(name), nil
}
func (e *paramAdapter) GetRequest() *http.Request {
return e.c.Request
}
func (e *paramAdapter) GetResponseWriter() http.ResponseWriter {
return e.c.Writer
}
func newParamAdapter(c *gin.Context) *paramAdapter {
return &paramAdapter{c: c}
}
Go
1
https://gitee.com/kristas/booting-go.git
git@gitee.com:kristas/booting-go.git
kristas
booting-go
booting-go
v1.4.4

搜索帮助