(out statusOutput, w io.Writer)
| 328 | } |
| 329 | |
| 330 | func outputStatusText(out statusOutput, w io.Writer) error { |
| 331 | r := getRenderer() |
| 332 | |
| 333 | fmt.Fprintf(w, "%s %s\n", formatLabel("Task:", r), formatTaskID(out.ID, r)) |
| 334 | fmt.Fprintf(w, "%s %s\n", formatLabel("Title:", r), out.Title) |
| 335 | fmt.Fprintf(w, "%s %s\n", formatLabel("Status:", r), formatStatus(out.Status, r)) |
| 336 | printStatusOptionalField(w, "Priority", out.Priority, r) |
| 337 | printStatusOptionalField(w, "Effort", out.Effort, r) |
| 338 | if len(out.Tags) > 0 { |
| 339 | fmt.Fprintf(w, "%s %s\n", formatLabel("Tags:", r), strings.Join(out.Tags, ", ")) |
| 340 | } |
| 341 | if out.Owner != "" { |
| 342 | fmt.Fprintf(w, "%s %s\n", formatLabel("Owner:", r), out.Owner) |
| 343 | } |
| 344 | if out.Parent != "" { |
| 345 | fmt.Fprintf(w, "%s %s\n", formatLabel("Parent:", r), out.Parent) |
| 346 | } |
| 347 | if out.Created != "" { |
| 348 | fmt.Fprintf(w, "%s %s\n", formatLabel("Created:", r), out.Created) |
| 349 | } |
| 350 | if len(out.Dependencies) > 0 { |
| 351 | fmt.Fprintf(w, "%s %s\n", formatLabel("Dependencies:", r), strings.Join(out.Dependencies, ", ")) |
| 352 | } |
| 353 | if out.Blocked != nil { |
| 354 | if *out.Blocked { |
| 355 | fmt.Fprintf(w, "%s Yes (blocked by: %s)\n", formatLabel("Blocked:", r), strings.Join(out.BlockedBy, ", ")) |
| 356 | } else { |
| 357 | fmt.Fprintf(w, "%s No\n", formatLabel("Blocked:", r)) |
| 358 | } |
| 359 | } |
| 360 | if out.Group != "" { |
| 361 | fmt.Fprintf(w, "%s %s\n", formatLabel("Group:", r), out.Group) |
| 362 | } |
| 363 | if len(out.Children) > 0 { |
| 364 | fmt.Fprintf(w, "%s\n", formatLabel("Children:", r)) |
| 365 | writeChildrenTree(w, out.Children, " ", r) |
| 366 | } |
| 367 | fmt.Fprintf(w, "%s %s\n", formatLabel("File:", r), formatDim(out.FilePath, r)) |
| 368 | return nil |
| 369 | } |
| 370 | |
| 371 | func writeChildrenTree(w io.Writer, children []statusChild, prefix string, r *lipgloss.Renderer) { |
| 372 | for i, child := range children { |
no test coverage detected