()
| 231 | } |
| 232 | |
| 233 | func 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 | |
| 261 | func wizardSelectSource() (string, error) { |
| 262 | names := sync.RegisteredNames() |
no test coverage detected