changed argType

This commit is contained in:
Linh Vo 2017-05-25 13:04:38 -05:00
parent e34e9f9789
commit 3706fc9022

View file

@ -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)