add searchql and help-esql commands

This commit is contained in:
2026-07-10 15:04:41 +02:00
parent 15dbf7ada0
commit 374ff99916
6 changed files with 1083 additions and 2 deletions

View File

@@ -24,10 +24,11 @@ import (
"github.com/go-openapi/swag/loading"
)
//go:embed *.json
//go:embed *.json *.md
var AssetFS embed.FS
var OpenAPI *loads.Document
var EsQlCheatSheet string
func LoadAssetOpenApi() {
doc, err := loads.Spec(
@@ -41,3 +42,12 @@ func LoadAssetOpenApi() {
OpenAPI = doc
}
func LoadEsql() {
md, err := AssetFS.ReadFile("esql.md")
if err != nil {
panic(err)
}
EsQlCheatSheet = string(md)
}