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

Method removeDownloadByID

internal/tui/helpers.go:64–72  ·  view source on GitHub ↗

removeDownloadByID removes a download from the in-memory list. Returns true if a download was removed.

(id string)

Source from the content-addressed store, hash-verified

62// removeDownloadByID removes a download from the in-memory list.
63// Returns true if a download was removed.
64func (m *RootModel) removeDownloadByID(id string) bool {
65 for i, d := range m.downloads {
66 if d.ID == id {
67 m.downloads = append(m.downloads[:i], m.downloads[i+1:]...)
68 return true
69 }
70 }
71 return false
72}
73
74func (m *RootModel) handleFilePickerSelection(path string) (tea.Model, tea.Cmd) {
75 switch m.filepickerOrigin {

Callers 4

updatePurgeConfirmMethod · 0.95
updateEventsMethod · 0.95
updateDashboardMethod · 0.95
startDownloadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected