func bindQuery(query url.Values, v interface{}, assignFuncs map[string]assignFunc) (url.Values, error) {
	if assignFuncs == nil {
		assignFuncs = make(map[string]assignFunc)
	}
	d := decodeState{
		data:        query,
		used:        make(map[string]bool),
		assignFuncs: assignFuncs,
	}
	err := d.decode(v)
	ret := d.unused()
	return ret, err
}
bindQuery parses url.Values and stores the result in the value pointed to by v.
if v is nil or not a pointer, bindQuery returns an InvalidDecodeError
package dsn
import (
	"encoding"
	"net/url"
	"reflect"
	"runtime"
	"strconv"
	"strings"
)
const (
	_tagID       = "dsn"
	_queryPrefix = "query."
)
type InvalidBindError struct {
	Type reflect.Type
}
func (e *InvalidBindError) Error() string {
	if e.Type == nil {
		return "Bind(nil)"
	}
	if e.Type.Kind() != reflect.Ptr {
		return "Bind(non-pointer " + e.Type.String() + ")"
	}
	return "Bind(nil " + e.Type.String() + ")"
}
type BindTypeError struct {
	Value string
	Type  reflect.Type
}
func (e *BindTypeError) Error() string {
	return "cannot decode " + e.Value + " into Go value of type " + e.Type.String()
}
type assignFunc func(v reflect.Value, to tagOpt) error
func stringsAssignFunc(val string) assignFunc {
	return func(v reflect.Value, to tagOpt) error {
		if v.Kind() != reflect.String || !v.CanSet() {
			return &BindTypeError{Value: "string", Type: v.Type()}
		}
		if val == "" {
			v.SetString(to.Default)
		} else {
			v.SetString(val)
		}
		return nil
	}
}