sync
This commit is contained in:
parent
99af6146d5
commit
652429377b
18 changed files with 188 additions and 498 deletions
12
cmd/root.go
12
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue