Batch returns a batched command, or nil if no commands were added.
()
| 52 | |
| 53 | // Batch returns a batched command, or nil if no commands were added. |
| 54 | func (b *Builder) Batch() tea.Cmd { |
| 55 | switch len(b.cmds) { |
| 56 | case 0: |
| 57 | return nil |
| 58 | case 1: |
| 59 | return b.cmds[0] |
| 60 | default: |
| 61 | return tea.Batch(b.cmds...) |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | // Len returns the number of commands in the batch. |
| 66 | func (b *Builder) Len() int { |
no outgoing calls
no test coverage detected