command describes the actions for a pprof command. Includes a function for command-line completion, the report format to use during report generation, any postprocessing functions, and whether the command expects a regexp parameter (typically a function name).
| 37 | // during report generation, any postprocessing functions, and whether |
| 38 | // the command expects a regexp parameter (typically a function name). |
| 39 | type command struct { |
| 40 | format int // report format to generate |
| 41 | postProcess PostProcessor // postprocessing to run on report |
| 42 | visualizer PostProcessor // display output using some callback |
| 43 | hasParam bool // collect a parameter from the CLI |
| 44 | description string // single-line description text saying what the command does |
| 45 | usage string // multi-line help text saying how the command is used |
| 46 | } |
| 47 | |
| 48 | // help returns a help string for a command. |
| 49 | func (c *command) help(name string) string { |
nothing calls this directly
no outgoing calls
no test coverage detected