[MM-55739] Allow admins to pipe the output of mmctl websocket into JSON parser (#25545)
Этот коммит содержится в:
коммит произвёл
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()
|
||||
|
||||
Ссылка в новой задаче
Block a user