From 264450537f9f61c5f69a62cdd709b8329c88add5 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Mon, 11 Apr 2022 10:32:38 +0200 Subject: [PATCH] remove url patcher --- fluxpipe-server.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/fluxpipe-server.go b/fluxpipe-server.go index 33217bb..a5d4050 100644 --- a/fluxpipe-server.go +++ b/fluxpipe-server.go @@ -124,7 +124,6 @@ func exec(inputString string) (string, string) { func main() { - url := flag.String("url", "", "ClickHouse MYSQL API URL") port := flag.String("port", "8086", "API port") stdin := flag.Bool("stdin", false, "STDIN mode") cors := flag.Bool("cors", true, "API cors mode") @@ -142,12 +141,6 @@ func main() { fmt.Fprintln(os.Stderr, "reading standard input:", err) } - if len(*url) > 1 { - orig := `"clickhouse"` - repl := fmt.Sprintf(`"mysql", dataSourceName: "%s"`, *url) - inputString = strings.ReplaceAll(inputString, orig, repl) - } - buf, _ := exec(inputString) fmt.Println(strings.Replace(buf, "\r\n", "\n", -1)) @@ -166,7 +159,7 @@ func main() { } e.GET("/", func(c echo.Context) error { - return c.String(http.StatusOK, "F-L-U-X-P-I-P-E") + return c.String(http.StatusOK, "|> FluxPIPE") }) e.GET("/ping", func(c echo.Context) error { return c.String(204, "OK") @@ -177,7 +170,7 @@ func main() { e.POST("/api/v2/query", postQuery) e.POST("/query", postQuery) - fmt.Println("|> FluxPIPE |>") + fmt.Println("|> FluxPIPE") e.Logger.Fatal(e.Start(":"+*port)) } }