(ctx Context)
| 30 | } |
| 31 | |
| 32 | func (p *profileCommand) Run(ctx Context) error { |
| 33 | switch t := p.Type; t { |
| 34 | case "cpu", "heap": |
| 35 | return saveToFile(fmt.Sprintf("debug/%vprof", p.Type), ctx.clientFactory) |
| 36 | default: |
| 37 | return fmt.Errorf("expected cpu or heap as argument, got %v", t) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | type debugCommand struct { |
| 42 | File fileCommand `cmd:"" help:"Show information about a file (or directory/symlink)"` |
nothing calls this directly
no test coverage detected