import (
"fmt"
"strconv"
+ "strings"
)
// FieldReaders are responsible for decoding fields out of data into
return s.ZeroValue()
}
+// SchemasForFlatmapPath tries its best to find a sequence of schemas that
+// the given dot-delimited attribute path traverses through.
+func SchemasForFlatmapPath(path string, schemaMap map[string]*Schema) []*Schema {
+ parts := strings.Split(path, ".")
+ return addrToSchema(parts, schemaMap)
+}
+
// addrToSchema finds the final element schema for the given address
// and the given schema. It returns all the schemas that led to the final
// schema. These are in order of the address (out to in).