(result coreansible.CommandResult)
| 2739 | } |
| 2740 | |
| 2741 | func formatCommandResult(result coreansible.CommandResult) string { |
| 2742 | var b strings.Builder |
| 2743 | |
| 2744 | b.WriteString("Command:\n") |
| 2745 | b.WriteString(result.Command) |
| 2746 | b.WriteString("\n\nDuration: ") |
| 2747 | b.WriteString(result.Duration.String()) |
| 2748 | if result.Err != nil { |
| 2749 | b.WriteString("\nError: ") |
| 2750 | b.WriteString(result.Err.Error()) |
| 2751 | } |
| 2752 | b.WriteString("\n\nOutput:\n") |
| 2753 | b.WriteString(result.Output) |
| 2754 | |
| 2755 | return b.String() |
| 2756 | } |
| 2757 | |
| 2758 | func (p *Plugin) centerModal(content tview.Primitive, width, height int) tview.Primitive { |
| 2759 | screenW, screenH := 120, 40 |
no test coverage detected