From 501c9d18d908831fc793d13ad348afa48db9231d Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Wed, 11 Oct 2017 01:28:26 +0300 Subject: [PATCH] add some minor comments for the view/django's origin type getters pushed by https://github.com/kataras/iris/pull/765 Former-commit-id: 2d406337901d5d22636490bd8de3939a33cee882 --- mvc/method_result_test.go | 4 ++-- view/django.go | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mvc/method_result_test.go b/mvc/method_result_test.go index 48965668..b6e2c28e 100644 --- a/mvc/method_result_test.go +++ b/mvc/method_result_test.go @@ -235,7 +235,7 @@ func (t *testControllerViewResultRespectCtxViewData) BeginRequest(ctx context.Co func (t *testControllerViewResultRespectCtxViewData) EndRequest(ctx context.Context) { t.C.EndRequest(ctx) - // check if data is not overriden by return mvc.View {Data: context.Map...} + // check if data is not overridden by return mvc.View {Data: context.Map...} dataWritten := ctx.GetViewData() if dataWritten == nil { @@ -245,7 +245,7 @@ func (t *testControllerViewResultRespectCtxViewData) EndRequest(ctx context.Cont if dataWritten["name_begin"] == nil { t.T.Fatalf(`view data[name_begin] is nil, - BeginRequest's ctx.ViewData call have been overriden by Get's return mvc.View {Data: }. + BeginRequest's ctx.ViewData call have been overridden by Get's return mvc.View {Data: }. Total view data: %v`, dataWritten) } diff --git a/view/django.go b/view/django.go index 3c78d370..5dbe1118 100644 --- a/view/django.go +++ b/view/django.go @@ -44,18 +44,26 @@ type ( TagParser func(doc *Parser, start *Token, arguments *Parser) (INodeTag, *Error) ) +// GetValue returns the `Value` as *pongo2.Value type. +// This method was added by balthild at https://github.com/kataras/iris/pull/765 func (value *Value) GetValue() *pongo2.Value { return (*pongo2.Value)(value) } +// GetError returns the `Error` as *pongo2.Error type. +// This method was added by balthild at https://github.com/kataras/iris/pull/765 func (error *Error) GetError() *pongo2.Error { return (*pongo2.Error)(error) } +// GetParser returns the `Parser` as *pongo2.Parser type. +// This method was added by balthild at https://github.com/kataras/iris/pull/765 func (parser *Parser) GetParser() *pongo2.Parser { return (*pongo2.Parser)(parser) } +// GetToken returns the `Token` as *pongo2.Token type. +// This method was added by balthild at https://github.com/kataras/iris/pull/765 func (token *Token) GetToken() *pongo2.Token { return (*pongo2.Token)(token) }