1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00

ok almost finished. We're good at deadlines eventually. Tomorrow at 23:59 an article will be published same time with the dev branch merge to master

Former-commit-id: 42c1bf88cedbddf3cc01366ab769139546902e71
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-12-31 02:32:28 +02:00
parent 617258890e
commit 1b1661ed53
22 changed files with 399 additions and 88 deletions

View File

@@ -5,9 +5,11 @@
//
//line base.qtpl:3
package templates
//line base.qtpl:3
import (
qtio422016 "io"
@@ -15,12 +17,14 @@ import (
)
//line base.qtpl:3
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line base.qtpl:4
type Partial interface {
//line base.qtpl:4
Body() string
@@ -29,11 +33,13 @@ type Partial interface {
//line base.qtpl:4
WriteBody(qq422016 qtio422016.Writer)
//line base.qtpl:4
}
// Template writes a template implementing the Partial interface.
//line base.qtpl:11
func StreamTemplate(qw422016 *qt422016.Writer, p Partial) {
//line base.qtpl:11
qw422016.N().S(`
@@ -61,9 +67,11 @@ func StreamTemplate(qw422016 *qt422016.Writer, p Partial) {
</html>
`)
//line base.qtpl:30
}
//line base.qtpl:30
func WriteTemplate(qq422016 qtio422016.Writer, p Partial) {
//line base.qtpl:30
qw422016 := qt422016.AcquireWriter(qq422016)
@@ -72,9 +80,11 @@ func WriteTemplate(qq422016 qtio422016.Writer, p Partial) {
//line base.qtpl:30
qt422016.ReleaseWriter(qw422016)
//line base.qtpl:30
}
//line base.qtpl:30
func Template(p Partial) string {
//line base.qtpl:30
qb422016 := qt422016.AcquireByteBuffer()
@@ -87,21 +97,27 @@ func Template(p Partial) string {
//line base.qtpl:30
return qs422016
//line base.qtpl:30
}
// Base template implementation. Other pages may inherit from it if they need
// overriding only certain Partial methods.
//line base.qtpl:35
type Base struct{}
//line base.qtpl:36
func (b *Base) StreamBody(qw422016 *qt422016.Writer) {
//line base.qtpl:36
qw422016.N().S(`This is the base body`) }
qw422016.N().S(`This is the base body`)
}
//line base.qtpl:36
//line base.qtpl:36
func (b *Base) WriteBody(qq422016 qtio422016.Writer) {
//line base.qtpl:36
qw422016 := qt422016.AcquireWriter(qq422016)
@@ -110,9 +126,11 @@ func (b *Base) WriteBody(qq422016 qtio422016.Writer) {
//line base.qtpl:36
qt422016.ReleaseWriter(qw422016)
//line base.qtpl:36
}
//line base.qtpl:36
func (b *Base) Body() string {
//line base.qtpl:36
qb422016 := qt422016.AcquireByteBuffer()
@@ -125,4 +143,5 @@ func (b *Base) Body() string {
//line base.qtpl:36
return qs422016
//line base.qtpl:36
}

View File

@@ -5,9 +5,11 @@
//
//line hello.qtpl:3
package templates
//line hello.qtpl:3
import (
qtio422016 "io"
@@ -15,17 +17,20 @@ import (
)
//line hello.qtpl:3
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line hello.qtpl:4
type Hello struct {
Vars map[string]interface{}
}
//line hello.qtpl:9
func (h *Hello) StreamBody(qw422016 *qt422016.Writer) {
//line hello.qtpl:9
qw422016.N().S(`
@@ -43,9 +48,11 @@ func (h *Hello) StreamBody(qw422016 *qt422016.Writer) {
</div>
`)
//line hello.qtpl:14
}
//line hello.qtpl:14
func (h *Hello) WriteBody(qq422016 qtio422016.Writer) {
//line hello.qtpl:14
qw422016 := qt422016.AcquireWriter(qq422016)
@@ -54,9 +61,11 @@ func (h *Hello) WriteBody(qq422016 qtio422016.Writer) {
//line hello.qtpl:14
qt422016.ReleaseWriter(qw422016)
//line hello.qtpl:14
}
//line hello.qtpl:14
func (h *Hello) Body() string {
//line hello.qtpl:14
qb422016 := qt422016.AcquireByteBuffer()
@@ -69,4 +78,5 @@ func (h *Hello) Body() string {
//line hello.qtpl:14
return qs422016
//line hello.qtpl:14
}

View File

@@ -5,9 +5,11 @@
//
//line index.qtpl:3
package templates
//line index.qtpl:3
import (
qtio422016 "io"
@@ -15,15 +17,18 @@ import (
)
//line index.qtpl:3
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line index.qtpl:4
type Index struct{}
//line index.qtpl:7
func (i *Index) StreamBody(qw422016 *qt422016.Writer) {
//line index.qtpl:7
qw422016.N().S(`
@@ -33,9 +38,11 @@ func (i *Index) StreamBody(qw422016 *qt422016.Writer) {
</div>
`)
//line index.qtpl:12
}
//line index.qtpl:12
func (i *Index) WriteBody(qq422016 qtio422016.Writer) {
//line index.qtpl:12
qw422016 := qt422016.AcquireWriter(qq422016)
@@ -44,9 +51,11 @@ func (i *Index) WriteBody(qq422016 qtio422016.Writer) {
//line index.qtpl:12
qt422016.ReleaseWriter(qw422016)
//line index.qtpl:12
}
//line index.qtpl:12
func (i *Index) Body() string {
//line index.qtpl:12
qb422016 := qt422016.AcquireByteBuffer()
@@ -59,4 +68,5 @@ func (i *Index) Body() string {
//line index.qtpl:12
return qs422016
//line index.qtpl:12
}