(t reportTask)
| 120 | } |
| 121 | |
| 122 | func taskToReportJSON(t reportTask) ReportTaskJSON { |
| 123 | var deps []string |
| 124 | if len(t.Dependencies) > 0 { |
| 125 | deps = t.Dependencies |
| 126 | } |
| 127 | return ReportTaskJSON{ |
| 128 | ID: t.ID, |
| 129 | Title: t.Title, |
| 130 | Status: t.Status, |
| 131 | Priority: t.Priority, |
| 132 | Dependencies: deps, |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | func outputReportJSON(data *reportData, outFile *os.File) error { |
| 137 | type reportJSON struct { |