douhua1890 2017-03-29 23:01
浏览 19

使用Go和Revel,未定义错误c.RenderArgs(可能已过时?)

I have a script that has some Go code with outdated revel. I ran into an issue that says:

 c.RenderArgs undefined (type *revel.Controller has no field or method RenderArgs)

And ive tried to search around, but can't figure out what to replace it with to fix the error. I'm not familiar with revel so its making things that much more difficult.

If someone could help, or simply link me to a space that could help(if i missed it, and i am sorry) i would be greatful!

  • 写回答

3条回答 默认 最新

  • douyue3800 2017-03-30 05:29
    关注

    Without posting more of your code, your question cannot be accurately answered, but here is what I found in the Godocs for Revel.

    func (c *Controller) Render(extraRenderArgs ...interface{}) Result

    Render a template corresponding to the calling Controller method. Arguments will be added to c.RenderArgs prior to rendering the template. They are keyed on their local identifier.

    I believe your code is either trying to modify a field that was changed to be no longer exported, or calling a method that has been changed to the one above.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端