MCPcopy
hub / github.com/SurgeDM/Surge / parseURLInput

Function parseURLInput

internal/tui/update_input.go:122–135  ·  view source on GitHub ↗

parseURLInput splits a comma-separated URL string into a primary URL and mirrors.

(input string)

Source from the content-addressed store, hash-verified

120
121// parseURLInput splits a comma-separated URL string into a primary URL and mirrors.
122func 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
137func (m RootModel) updateExtensionConfirmation(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
138 if key.Matches(msg, m.keys.Extension.Browse) && m.focusedInput == 2 {

Callers 1

submitInputFormMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected