VictoriaMetrics/app/vlselect/logsql/field_names_response.qtpl

18 lines
311 B
Plaintext
Raw Normal View History

2024-05-20 04:08:30 +02:00
{% stripspace %}
// FieldNamesResponse formats /select/logsql/field_names response
{% func FieldNamesResponse(names []string) %}
{
"names":[
{% if len(names) > 0 %}
{%q= names[0] %}
{% for _, v := range names[1:] %}
,{%q= v %}
{% endfor %}
{% endif %}
]
}
{% endfunc %}
{% endstripspace %}