diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/root.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd/root.go b/cmd/root.go index ab102afe6..81083ef72 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -182,6 +182,18 @@ to assist developers in writing, debugging, and understanding code directly from } }() + evts, err := app.Client.Event(ctx) + if err != nil { + slog.Error("Failed to subscribe to events", "error", err) + return err + } + + go func() { + for item := range evts { + program.Send(item) + } + }() + // Cleanup function for when the program exits cleanup := func() { // Cancel subscriptions first |
