github.com/be-b10g/golangci-lint@v1.17.2/test/testdata/quicktemplate/hello.qtpl.go (about) 1 // This file is automatically generated by qtc from "hello.qtpl". 2 // See https://github.com/valyala/quicktemplate for details. 3 4 // All text outside function templates is treated as comments, 5 // i.e. it is just ignored by quicktemplate compiler (`qtc`). It is for humans. 6 // 7 // Hello is a simple template function. 8 9 //line hello.qtpl:5 10 package quicktemplate 11 12 //line hello.qtpl:5 13 import ( 14 qtio422016 "io" 15 16 qt422016 "github.com/valyala/quicktemplate" 17 ) 18 19 //line hello.qtpl:5 20 var ( 21 _ = qtio422016.Copy 22 _ = qt422016.AcquireByteBuffer 23 ) 24 25 //line hello.qtpl:5 26 func StreamHello(qw422016 *qt422016.Writer, name string) { 27 //line hello.qtpl:5 28 qw422016.N().S(` 29 Hello, `) 30 //line hello.qtpl:6 31 qw422016.E().S(name) 32 //line hello.qtpl:6 33 qw422016.N().S(`! 34 `) 35 //line hello.qtpl:7 36 } 37 38 //line hello.qtpl:7 39 func WriteHello(qq422016 qtio422016.Writer, name string) { 40 //line hello.qtpl:7 41 qw422016 := qt422016.AcquireWriter(qq422016) 42 //line hello.qtpl:7 43 StreamHello(qw422016, name) 44 //line hello.qtpl:7 45 qt422016.ReleaseWriter(qw422016) 46 //line hello.qtpl:7 47 } 48 49 //line hello.qtpl:7 50 func Hello(name string) string { 51 //line hello.qtpl:7 52 qb422016 := qt422016.AcquireByteBuffer() 53 //line hello.qtpl:7 54 WriteHello(qb422016, name) 55 //line hello.qtpl:7 56 qs422016 := string(qb422016.B) 57 //line hello.qtpl:7 58 qt422016.ReleaseByteBuffer(qb422016) 59 //line hello.qtpl:7 60 return qs422016 61 //line hello.qtpl:7 62 }