code: func (c *Controller) SetTypeAction(controllerName, methodName string, typeOfController *ControllerType) error {
  
  	// Look up the controller and method types.
  	if typeOfController == nil {
  		if c.Type = ControllerTypeByName(controllerName, anyModule); c.Type == nil {
  			return errors.New("revel/controller: failed to find controller " + controllerName)
  		}
  	} else {
  		c.Type = typeOfController
  	}
  
  	// Note method name is case insensitive search
  	if c.MethodType = c.Type.Method(methodName); c.MethodType == nil {
  		return errors.New("revel/controller: failed to find action " + controllerName + "." + methodName)
  	}
  
  	c.Name, c.MethodName = c.Type.Type.Name(), c.MethodType.Name
  	c.Action = c.Name + "." + c.MethodName
  
  	// Update Logger with controller and namespace
  	if c.Log != nil {
  		c.Log = c.Log.New("action", c.Action, "namespace", c.Type.Namespace)
  	}
  
  	if RevelConfig.Controller.Reuse {
  		if _, ok := RevelConfig.Controller.CachedMap[c.Name]; !ok {
  			// Create a new stack for this controller
  			localType := c.Type.Type
  			RevelConfig.Controller.CachedMap[c.Name] = utils.NewStackLock(
  				RevelConfig.Controller.CachedStackSize,
  				RevelConfig.Controller.CachedStackMaxSize,
  				func() interface{} {
  					return reflect.New(localType).Interface()
  				})
  		}
  		// Instantiate the controller.
  		c.AppController = RevelConfig.Controller.CachedMap[c.Name].Pop()
  	} else {
  		c.AppController = reflect.New(c.Type.Type).Interface()
  	}
  	c.setAppControllerFields()
  
  	return nil
  }
docs: // SetAction sets the assigns the Controller type, sets the action and initializes the controller