MCPcopy Create free account
hub / github.com/driangle/taskmd / runImportWizard

Function runImportWizard

apps/cli/internal/cli/importcmd.go:233–259  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231}
232
233func runImportWizard() (sync.ImportConfig, error) {
234 sourceName, err := wizardSelectSource()
235 if err != nil {
236 return sync.ImportConfig{}, err
237 }
238
239 srcCfg, err := wizardSourceConfig(sourceName)
240 if err != nil {
241 return sync.ImportConfig{}, err
242 }
243
244 outDir, err := wizardOutputDir()
245 if err != nil {
246 return sync.ImportConfig{}, err
247 }
248
249 if err := wizardConfirm(); err != nil {
250 return sync.ImportConfig{}, err
251 }
252
253 return sync.ImportConfig{
254 SourceName: sourceName,
255 SourceCfg: srcCfg,
256 OutputDir: outDir,
257 ScanDir: ".",
258 }, nil
259}
260
261func wizardSelectSource() (string, error) {
262 names := sync.RegisteredNames()

Callers 1

runImportFunction · 0.85

Calls 4

wizardSelectSourceFunction · 0.85
wizardSourceConfigFunction · 0.85
wizardOutputDirFunction · 0.85
wizardConfirmFunction · 0.85

Tested by

no test coverage detected