code: func (c *Config) rulesFor(rt reflect.Type) (fieldRules, error) {
  	//	if rt.Kind() != reflect.Struct {
  	//		return nil, fmt.Errorf("expected struct, got: %v", rt)
  	//	}
  	c.rulesForTypeMu.RLock()
  	rules, ok := c.rulesForType[rt]
  	c.rulesForTypeMu.RUnlock()
  	if ok {
  		return rules, nil
  	}
  	out := make(fieldRules)
  	if err := c.rulesForStructTo(out, "", rt); err != nil {
  		return nil, err
  	}
  	c.rulesForTypeMu.Lock()
  	if c.rulesForType == nil {
  		c.rulesForType = make(map[reflect.Type]fieldRules)
  	}
  	c.rulesForType[rt] = out
  	c.rulesForTypeMu.Unlock()
  	return out, nil
  }
docs: // rulesFor
  //
  // Returned map should not be changed.