mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
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:
parent
be03f915bb
commit
501c9d18d9
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user