func newConfig() *ConfigStruct { config := &ConfigStruct{} e := reflect.ValueOf(config).Elem() for kind, path := range Configs { v := reflect.ValueOf(createConfigObject(kind, path)) e.FieldByName(utils.Capitalize(kind)).Set(v) } return config }
func (s *Controller) getTargetController(name, action string) reflect.Value { c := controllers.GetContrllers()[name] return reflect.ValueOf(c).MethodByName(utils.Capitalize(action)) }