diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-27 12:20:09 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-27 12:20:09 +0200 |
| commit | 2ddb334fa671b9c425ca43c8c673c6b36c3ad0ab (patch) | |
| tree | cfff7b2b8397ebf4fad9b81a91d54563ea66d208 /internal/askcli/taskexport.go | |
| parent | c8c57f0d5821ae0542cb613c87e6ed2ea66e1e0a (diff) | |
release: v0.27.1v0.27.1
Diffstat (limited to 'internal/askcli/taskexport.go')
| -rw-r--r-- | internal/askcli/taskexport.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/askcli/taskexport.go b/internal/askcli/taskexport.go index d633d3c..be24117 100644 --- a/internal/askcli/taskexport.go +++ b/internal/askcli/taskexport.go @@ -34,3 +34,19 @@ func ParseTaskExport(r io.Reader) ([]TaskExport, error) { } return tasks, nil } + +type taskExportWithID struct { + ID string `json:"id,omitempty"` + TaskExport +} + +func withTaskIDs(tasks []TaskExport, aliases map[string]string) []taskExportWithID { + withIDs := make([]taskExportWithID, len(tasks)) + for i := range withIDs { + withIDs[i] = taskExportWithID{ + ID: displayTaskAlias(tasks[i].UUID, aliases), + TaskExport: tasks[i], + } + } + return withIDs +} |
