writeOK wraps writer.OK and always injects statsOption() so every command response includes request stats when --stats is set.
(data any, opts ...output.ResponseOption)
| 260 | // writeOK wraps writer.OK and always injects statsOption() so every command |
| 261 | // response includes request stats when --stats is set. |
| 262 | func writeOK(data any, opts ...output.ResponseOption) error { |
| 263 | return writer.OK(data, append(opts, statsOption())...) |
| 264 | } |
| 265 | |
| 266 | func printAgentHelp(cmd *cobra.Command) { |
| 267 | info := map[string]any{ |