mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-20 23:46:23 +01:00
70 lines
2.4 KiB
Go
70 lines
2.4 KiB
Go
|
// Code generated by qtc from "field_names_response.qtpl". DO NOT EDIT.
|
||
|
// See https://github.com/valyala/quicktemplate for details.
|
||
|
|
||
|
// FieldNamesResponse formats /select/logsql/field_names response
|
||
|
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:4
|
||
|
package logsql
|
||
|
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:4
|
||
|
import (
|
||
|
qtio422016 "io"
|
||
|
|
||
|
qt422016 "github.com/valyala/quicktemplate"
|
||
|
)
|
||
|
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:4
|
||
|
var (
|
||
|
_ = qtio422016.Copy
|
||
|
_ = qt422016.AcquireByteBuffer
|
||
|
)
|
||
|
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:4
|
||
|
func StreamFieldNamesResponse(qw422016 *qt422016.Writer, names []string) {
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:4
|
||
|
qw422016.N().S(`{"names":[`)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:7
|
||
|
if len(names) > 0 {
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:8
|
||
|
qw422016.N().Q(names[0])
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:9
|
||
|
for _, v := range names[1:] {
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:9
|
||
|
qw422016.N().S(`,`)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:10
|
||
|
qw422016.N().Q(v)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:11
|
||
|
}
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:12
|
||
|
}
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:12
|
||
|
qw422016.N().S(`]}`)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
}
|
||
|
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
func WriteFieldNamesResponse(qq422016 qtio422016.Writer, names []string) {
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
StreamFieldNamesResponse(qw422016, names)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
qt422016.ReleaseWriter(qw422016)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
}
|
||
|
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
func FieldNamesResponse(names []string) string {
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
qb422016 := qt422016.AcquireByteBuffer()
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
WriteFieldNamesResponse(qb422016, names)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
qs422016 := string(qb422016.B)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
qt422016.ReleaseByteBuffer(qb422016)
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
return qs422016
|
||
|
//line app/vlselect/logsql/field_names_response.qtpl:15
|
||
|
}
|