Skip to content

Commit 0e454f2

Browse files
committed
viewsss
1 parent c0220f9 commit 0e454f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Controller struct {
3636
Session Session // Session, stored in cookie, signed.
3737
Params *Params // Parameters from URL and form (including multipart).
3838
Args map[string]interface{} // Per-request scratch space.
39-
RenderArgs map[string]interface{} // Args passed to the template.
39+
ViewArgs map[string]interface{} // Variables passed to the template.
4040
Validation *Validation // Data validation helpers
4141
}
4242

@@ -47,7 +47,7 @@ func NewController(req *Request, resp *Response) *Controller {
4747
Response: resp,
4848
Params: new(Params),
4949
Args: map[string]interface{}{},
50-
RenderArgs: map[string]interface{}{
50+
ViewArgs: map[string]interface{}{
5151
"RunMode": RunMode,
5252
"DevMode": DevMode,
5353
},
@@ -69,7 +69,7 @@ func (c *Controller) SetCookie(cookie *http.Cookie) {
6969
func (c *Controller) RenderError(err error) Result {
7070
c.setStatusIfNil(http.StatusInternalServerError)
7171

72-
return ErrorResult{c.RenderArgs, err}
72+
return ErrorResult{c.ViewArgs, err}
7373
}
7474

7575
func (c *Controller) setStatusIfNil(status int) {

validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func ValidationFilter(c *Controller, fc []Filter) {
195195
fc[0](c, fc[1:])
196196

197197
// Add Validation errors to RenderArgs.
198-
c.RenderArgs["errors"] = c.Validation.ErrorMap()
198+
c.ViewArgs["errors"] = c.Validation.ErrorMap()
199199

200200
// Store the Validation errors
201201
var errorsValue string

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy