mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-07-28 09:43:59 +00:00
Upgrade Gin version and print the query string
This commit is contained in:
@@ -77,7 +77,7 @@ func readConnectionSingle(wg *sync.WaitGroup, conn net.Conn, entry *map[string]i
|
||||
|
||||
command := handleCommands(text)
|
||||
if !command {
|
||||
fmt.Printf("\b\b** %s\n> ", text)
|
||||
// fmt.Printf("\b\b** %s\n> ", text)
|
||||
|
||||
if text == "" {
|
||||
err := scanner.Err()
|
||||
@@ -126,7 +126,7 @@ func readConnection(wg *sync.WaitGroup, conn net.Conn, ws *websocket.Conn) {
|
||||
|
||||
command := handleCommands(text)
|
||||
if !command {
|
||||
fmt.Printf("\b\b** %s\n> ", text)
|
||||
// fmt.Printf("\b\b** %s\n> ", text)
|
||||
|
||||
if text == "" {
|
||||
err := scanner.Err()
|
||||
|
||||
@@ -2,6 +2,7 @@ package api
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -41,6 +42,7 @@ func init() {
|
||||
|
||||
func WebSocketRoutes(app *gin.Engine, eventHandlers EventHandlers) {
|
||||
app.GET("/ws", func(c *gin.Context) {
|
||||
fmt.Printf("query: %v\n", c.Request.URL.Query())
|
||||
query := c.DefaultQuery("q", "")
|
||||
websocketHandlerUI(c.Writer, c.Request, eventHandlers, false, query)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user