[MM-55739] Allow admins to pipe the output of mmctl websocket into JSON parser (#25545)

Этот коммит содержится в:
Ben Schumacher
2023-11-27 12:45:32 +01:00
коммит произвёл GitHub
родитель 3cc3e88a57
Коммит 0a38042d58

Просмотреть файл

@@ -5,6 +5,7 @@ package commands
import (
"fmt"
"os"
"github.com/pkg/errors"
"github.com/spf13/cobra"
@@ -31,7 +32,7 @@ func websocketCmdF(cmd *cobra.Command, args []string) error {
}
c.Listen()
fmt.Println("Press CTRL+C to exit")
fmt.Fprintln(os.Stderr, "Press CTRL+C to exit")
for {
event := <-c.EventChannel
data, err := event.ToJSON()