func (l List) Match(name string) *Field {
	return l.MatchBytes([]byte(name))
}
Match returns the field in the list whose name best matches the supplied
name, nor nil if no field does. If there is a field with the exact name, it
is returned. Otherwise the first field (sorted by index) whose name matches
case-insensitively is returned.
package fields
import (
	"bytes"
	"reflect"
	"sort"
	"cloud.google.com/go/internal/atomiccache"
)
type Field struct {
	Name        string        
	NameFromTag bool          
	Type        reflect.Type  
	Index       []int         
	ParsedTag   interface{}   
	nameBytes []byte
	equalFold func(s, t []byte) bool
}
type ParseTagFunc func(reflect.StructTag) (name string, keep bool, other interface{}, err error)
type ValidateFunc func(reflect.Type) error
type LeafTypesFunc func(reflect.Type) bool
type Cache struct {
	parseTag  ParseTagFunc
	validate  ValidateFunc
	leafTypes LeafTypesFunc
	cache     atomiccache.Cache  
}
func NewCache(parseTag ParseTagFunc, validate ValidateFunc, leafTypes LeafTypesFunc) *Cache {
	if parseTag == nil {
		parseTag = func(reflect.StructTag) (string, bool, interface{}, error) {
			return "", true, nil, nil
		}
	}
	if validate == nil {
		validate = func(reflect.Type) error {
			return nil
		}
	}
	if leafTypes == nil {
		leafTypes = func(reflect.Type) bool {
			return false
		}
	}
	return &Cache{
		parseTag:  parseTag,
		validate:  validate,
		leafTypes: leafTypes,
	}
}
type fieldScan struct {
	typ   reflect.Type
	index []int
}
func (c *Cache) Fields(t reflect.Type) (List, error) {
	if t.Kind() != reflect.Struct {
		panic("fields: Fields of non-struct type")
	}
	return c.cachedTypeFields(t)
}
type List []Field