func NewEncoder() *Encoder {
	e := &Encoder{
		tagName:        "form",
		mode:           ModeImplicit,
		structCache:    newStructCacheMap(),
		embedAnonymous: true,
	}
	e.dataPool = &sync.Pool{New: func() interface{} {
		return &encoder{
			e:         e,
			namespace: make([]byte, 0, 64),
		}
	}}
	return e
}
NewEncoder creates a new encoder instance with sane defaults
package form
import (
	"bytes"
	"net/url"
	"reflect"
	"strings"
	"sync"
)
type EncodeCustomTypeFunc func(x interface{}) ([]string, error)
type EncodeErrors map[string]error
func (e EncodeErrors) Error() string {
	buff := bytes.NewBufferString(blank)
	for k, err := range e {
		buff.WriteString(fieldNS)
		buff.WriteString(k)
		buff.WriteString(errorText)
		buff.WriteString(err.Error())
		buff.WriteString("\n")
	}
	return strings.TrimSpace(buff.String())
}
type InvalidEncodeError struct {
	Type reflect.Type
}
func (e *InvalidEncodeError) Error() string {
	if e.Type == nil {
		return "form: Encode(nil)"
	}
	return "form: Encode(nil " + e.Type.String() + ")"
}
type Encoder struct {
	tagName         string
	structCache     *structCacheMap
	customTypeFuncs map[reflect.Type]EncodeCustomTypeFunc
	dataPool        *sync.Pool
	mode            Mode
	embedAnonymous  bool
}