/
githubmirror
/
GoFrame
Обзор
Документация
Войти
/
githubmirror
/
GoFrame
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
net/ghttp/ghttp_server_util.go
23 строки
702 B
John Guo
improve package gcfg for searching priority
16 янв 2021, 17:31
16 янв 2021, 17:31
91e29e2
Код
Авторство
О чём код?
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package ghttp import "net/http" // WrapF is a helper function for wrapping http.HandlerFunc and returns a ghttp.HandlerFunc. func WrapF(f http.HandlerFunc) HandlerFunc { return func(r *Request) { f(r.Response.Writer, r.Request) } } // WrapH is a helper function for wrapping http.Handler and returns a ghttp.HandlerFunc. func WrapH(h http.Handler) HandlerFunc { return func(r *Request) { h.ServeHTTP(r.Response.Writer, r.Request) } }