1
0
mirror of https://github.com/ggicci/httpin.git synced 2024-11-30 08:56:52 +02:00

refactor: rename Input to New

This commit is contained in:
Ggicci 2021-04-13 13:34:03 +08:00
parent bec70121b9
commit 98d506b443

View File

@ -7,7 +7,7 @@ import (
"reflect"
)
func Input(inputStruct interface{}) Middleware {
func New(inputStruct interface{}) Middleware {
typ := reflect.TypeOf(inputStruct) // retrieve type information
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {