mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-55739] Allow admins to pipe the output of mmctl websocket into JSON parser (#25545)
This commit is contained in:
parent
3cc3e88a57
commit
0a38042d58
@ -5,6 +5,7 @@ package commands
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
@ -31,7 +32,7 @@ func websocketCmdF(cmd *cobra.Command, args []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.Listen()
|
c.Listen()
|
||||||
fmt.Println("Press CTRL+C to exit")
|
fmt.Fprintln(os.Stderr, "Press CTRL+C to exit")
|
||||||
for {
|
for {
|
||||||
event := <-c.EventChannel
|
event := <-c.EventChannel
|
||||||
data, err := event.ToJSON()
|
data, err := event.ToJSON()
|
||||||
|
Loading…
Reference in New Issue
Block a user