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
This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-10-11 01:28:26 +03:00
parent be03f915bb
commit 501c9d18d9
2 changed files with 10 additions and 2 deletions

View File

@ -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)
}

View File

@ -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)
}