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

Function printImportTable

apps/cli/internal/cli/importcmd.go:530–560  ·  view source on GitHub ↗
(result *sync.ImportResult, summary importSummary, quietMode bool)

Source from the content-addressed store, hash-verified

528}
529
530func printImportTable(result *sync.ImportResult, summary importSummary, quietMode bool) error {
531 if quietMode {
532 return nil
533 }
534
535 if len(result.Created) > 0 {
536 fmt.Printf(" Created %d task(s):\n", len(result.Created))
537 for _, a := range result.Created {
538 fmt.Printf(" + [%s] %s\n", a.LocalID, a.Title)
539 }
540 }
541
542 if len(result.Skipped) > 0 {
543 fmt.Printf(" Skipped %d task(s) (duplicate external_id):\n", len(result.Skipped))
544 for _, a := range result.Skipped {
545 fmt.Printf(" - [%s] %s\n", a.ExternalID, a.Title)
546 }
547 }
548
549 if len(result.Errors) > 0 {
550 fmt.Printf(" Errors %d task(s):\n", len(result.Errors))
551 for _, e := range result.Errors {
552 fmt.Printf(" x [%s] %s: %v\n", e.ExternalID, e.Title, e.Err)
553 }
554 }
555
556 fmt.Printf(" Done: %d total, %d created, %d skipped, %d errors\n",
557 summary.Total, summary.Created, summary.Skipped, summary.Errors)
558
559 return nil
560}

Callers 2

printImportResultFunction · 0.85
capturePrintImportTableFunction · 0.85

Calls

no outgoing calls

Tested by 1

capturePrintImportTableFunction · 0.68