parseURLInput splits a comma-separated URL string into a primary URL and mirrors.
(input string)
| 120 | |
| 121 | // parseURLInput splits a comma-separated URL string into a primary URL and mirrors. |
| 122 | func parseURLInput(input string) (url string, mirrors []string) { |
| 123 | for _, part := range strings.Split(input, ",") { |
| 124 | cleaned := strings.TrimSpace(part) |
| 125 | if cleaned == "" { |
| 126 | continue |
| 127 | } |
| 128 | if url == "" { |
| 129 | url = cleaned |
| 130 | } else { |
| 131 | mirrors = append(mirrors, cleaned) |
| 132 | } |
| 133 | } |
| 134 | return |
| 135 | } |
| 136 | |
| 137 | func (m RootModel) updateExtensionConfirmation(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { |
| 138 | if key.Matches(msg, m.keys.Extension.Browse) && m.focusedInput == 2 { |