func (m *Map) FindField(name string) (StructField, bool) {
	m.once.Do(func() {
		m.m = make(map[string]StructField, len(m.Fields))
		for _, field := range m.Fields {
			m.m[field.Name] = field
		}
	})
	sf, ok := m.m[name]
	return sf, ok
}
FindField is a convenience function that returns the referenced StructField,
if it exists, or (nil, false) if it doesn't.
package schema
import "sync"
type Schema struct {
	Types []TypeDef `yaml:"types,omitempty"`
	once sync.Once
	m    map[string]TypeDef
}
type TypeSpecifier struct {
	Type   TypeRef `yaml:"type,omitempty"`
	Schema Schema  `yaml:"schema,omitempty"`
}
type TypeDef struct {
	Name string `yaml:"name,omitempty"`
	Atom `yaml:"atom,omitempty,inline"`
}
type TypeRef struct {
	NamedType *string `yaml:"namedType,omitempty"`
	Inlined   Atom    `yaml:",inline,omitempty"`
}
type Atom struct {
	*Scalar `yaml:"scalar,omitempty"`
	*List   `yaml:"list,omitempty"`
	*Map    `yaml:"map,omitempty"`
}
type Scalar string
const (
	Numeric = Scalar("numeric")
	String  = Scalar("string")
	Boolean = Scalar("boolean")
)
type ElementRelationship string
const (
	Associative = ElementRelationship("associative")
	Atomic = ElementRelationship("atomic")
	Separable = ElementRelationship("separable")
)
type Map struct {
	Fields []StructField `yaml:"fields,omitempty"`
	Unions []Union `yaml:"unions,omitempty"`
	ElementType TypeRef `yaml:"elementType,omitempty"`
	ElementRelationship ElementRelationship `yaml:"elementRelationship,omitempty"`
	once sync.Once
	m    map[string]StructField
}