feat(01-03): add deterministic rich CLI output
- Inject bonfire.Output from stdin/stdout/stderr with stdlib widgets and x/term - Degrade spinner, progress, table and prompts without a TTY or color - Reject plugin command names that are not namespace:verb
This commit is contained in:
@@ -82,6 +82,10 @@ func (p *Plugin) Commands() []bonfire.Command {
|
||||
}
|
||||
handled = ok
|
||||
}
|
||||
out.Table([]string{"plugin", "status"}, [][]string{{"golem15.greeter", "active"}})
|
||||
if _, err := out.Confirm("show greeting?", true); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Printf("name=%s posts_per_page=%d debug=%t extra=%s events=%s collected=%s handled=%t\n", name, posts, debug, p.extra, events, collected, handled)
|
||||
return nil
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user