Function
outputAddResult
(id, title, filePath string)
Source from the content-addressed store, hash-verified
| 349 | } |
| 350 | |
| 351 | func outputAddResult(id, title, filePath string) error { |
| 352 | switch addFormat { |
| 353 | case "json": |
| 354 | return WriteJSON(os.Stdout, addResult{ |
| 355 | ID: id, |
| 356 | Title: title, |
| 357 | FilePath: filePath, |
| 358 | Status: addStatus, |
| 359 | Priority: addPriority, |
| 360 | }) |
| 361 | default: |
| 362 | fmt.Printf("Created task %s: %s\n", id, filePath) |
| 363 | return nil |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | func openInEditor(filePath string) error { |
| 368 | editor := os.Getenv("EDITOR") |
Tested by
no test coverage detected