From 3706fc90222d64877a2c79f994a44b5583fff615 Mon Sep 17 00:00:00 2001 From: Linh Vo Date: Thu, 25 May 2017 13:04:38 -0500 Subject: [PATCH] changed argType --- handler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handler.go b/handler.go index f7b956bc6..c4a2c2a06 100644 --- a/handler.go +++ b/handler.go @@ -885,10 +885,10 @@ func (h *Handler) readURLQueryRequest(r *http.Request) (*QueryRequest, error) { // validOptions return all attributes of an interface with lower first character. func validOptions(v interface{}) map[string]bool { validQuery := make(map[string]bool) - argsType := reflect.ValueOf(v) + argsType := reflect.ValueOf(v).Type() - for i := 0; i < argsType.Type().NumField(); i++ { - fieldName := argsType.Type().Field(i).Name + for i := 0; i < argsType.NumField(); i++ { + fieldName := argsType.Field(i).Name chars := []rune(fieldName) chars[0] = unicode.ToLower(chars[0]) fieldName = string(chars)