func (rs *ResourceSet) writeResDirs(w io.Writer, s *state) error {
	for _, tid := range s.orderedKeys {
		if err := rs.Types[tid].write(w, s); err != nil {
			return err
		}
	}
	return nil
}
// writeResDirs is where we write the resource directory (2nd level: type->resource)
writeResDirs is where we write the resource directory (2nd level: type->resource)
// writeResDirs is where we write the resource directory ( 2nd level : type - > resource )
func (rs *ResourceSet) writeResDirs(w io.Writer, s *state) error {
	for _, tid := range s.orderedKeys {
		if err := rs.Types[tid].write(w, s); err != nil {
			return err
		}
	}
	return nil
}
func ( rs * ResourceSet ) writeResDirs ( w io . Writer , s * state ) error { for _ , tid := range s . orderedKeys { if err := rs . Types [ tid ] . write ( w , s ) ; err != nil { return err } } return nil }
writeResDirs is where we write the resource directory (2nd level: type->resource)
writeResDirs is where we write the resource directory ( 2nd level : type - > resource )