pkg/server/json.qtpl.go (51 lines of code) (raw):
// Code generated by qtc from "json.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line pkg/server/json.qtpl:1
package server
//line pkg/server/json.qtpl:1
import "github.com/JetBrains/ij-perf-report-aggregator/pkg/http-error"
//line pkg/server/json.qtpl:4
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line pkg/server/json.qtpl:4
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line pkg/server/json.qtpl:4
func streamhttpError(qw422016 *qt422016.Writer, error *http_error.HttpError) {
//line pkg/server/json.qtpl:4
qw422016.N().S(`{"error":`)
//line pkg/server/json.qtpl:6
qw422016.N().Q(error.Message)
//line pkg/server/json.qtpl:6
qw422016.N().S(`}`)
//line pkg/server/json.qtpl:8
}
//line pkg/server/json.qtpl:8
func writehttpError(qq422016 qtio422016.Writer, error *http_error.HttpError) {
//line pkg/server/json.qtpl:8
qw422016 := qt422016.AcquireWriter(qq422016)
//line pkg/server/json.qtpl:8
streamhttpError(qw422016, error)
//line pkg/server/json.qtpl:8
qt422016.ReleaseWriter(qw422016)
//line pkg/server/json.qtpl:8
}
//line pkg/server/json.qtpl:8
func httpError(error *http_error.HttpError) string {
//line pkg/server/json.qtpl:8
qb422016 := qt422016.AcquireByteBuffer()
//line pkg/server/json.qtpl:8
writehttpError(qb422016, error)
//line pkg/server/json.qtpl:8
qs422016 := string(qb422016.B)
//line pkg/server/json.qtpl:8
qt422016.ReleaseByteBuffer(qb422016)
//line pkg/server/json.qtpl:8
return qs422016
//line pkg/server/json.qtpl:8
}
//line pkg/server/json.qtpl:10
func streamsafeStringList(qw422016 *qt422016.Writer, list []string) {
//line pkg/server/json.qtpl:10
qw422016.N().S(`[`)
//line pkg/server/json.qtpl:12
for i, v := range list {
//line pkg/server/json.qtpl:13
if i != 0 {
//line pkg/server/json.qtpl:13
qw422016.N().S(`,`)
//line pkg/server/json.qtpl:13
}
//line pkg/server/json.qtpl:13
qw422016.N().S(`"`)
//line pkg/server/json.qtpl:14
qw422016.N().S(v)
//line pkg/server/json.qtpl:14
qw422016.N().S(`"`)
//line pkg/server/json.qtpl:15
}
//line pkg/server/json.qtpl:15
qw422016.N().S(`]`)
//line pkg/server/json.qtpl:17
}
//line pkg/server/json.qtpl:17
func writesafeStringList(qq422016 qtio422016.Writer, list []string) {
//line pkg/server/json.qtpl:17
qw422016 := qt422016.AcquireWriter(qq422016)
//line pkg/server/json.qtpl:17
streamsafeStringList(qw422016, list)
//line pkg/server/json.qtpl:17
qt422016.ReleaseWriter(qw422016)
//line pkg/server/json.qtpl:17
}
//line pkg/server/json.qtpl:17
func safeStringList(list []string) string {
//line pkg/server/json.qtpl:17
qb422016 := qt422016.AcquireByteBuffer()
//line pkg/server/json.qtpl:17
writesafeStringList(qb422016, list)
//line pkg/server/json.qtpl:17
qs422016 := string(qb422016.B)
//line pkg/server/json.qtpl:17
qt422016.ReleaseByteBuffer(qb422016)
//line pkg/server/json.qtpl:17
return qs422016
//line pkg/server/json.qtpl:17
}