func (rs *ResourceSet) writeDataIndex(w io.Writer, s *state) error {
	for _, tid := range s.orderedKeys {
		te := rs.Types[tid]
		for _, rid := range te.OrderedKeys {
			re := te.Resources[rid]
			for _, lcid := range re.OrderedKeys {
				if err := re.Data[lcid].write(w, s); err != nil {
					return err
				}
			}
		}
	}
	return nil
}
// writeDataIndex is where we write the resource data index (4th level: type->resource->locale->data address)
writeDataIndex is where we write the resource data index (4th level: type->resource->locale->data address)
// writeDataIndex is where we write the resource data index ( 4th level : type - > resource - > locale - > data address )
func (rs *ResourceSet) writeDataIndex(w io.Writer, s *state) error {
	for _, tid := range s.orderedKeys {
		te := rs.Types[tid]
		for _, rid := range te.OrderedKeys {
			re := te.Resources[rid]
			for _, lcid := range re.OrderedKeys {
				if err := re.Data[lcid].write(w, s); err != nil {
					return err
				}
			}
		}
	}
	return nil
}
func ( rs * ResourceSet ) writeDataIndex ( w io . Writer , s * state ) error { for _ , tid := range s . orderedKeys { te := rs . Types [ tid ] for _ , rid := range te . OrderedKeys { re := te . Resources [ rid ] for _ , lcid := range re . OrderedKeys { if err := re . Data [ lcid ] . write ( w , s ) ; err != nil { return err } } } } return nil }
writeDataIndex is where we write the resource data index (4th level: type->resource->locale->data address)
writeDataIndex is where we write the resource data index ( 4th level : type - > resource - > locale - > data address )