| 188 | return writeOK(map[string]string{"date": date, "content": content}, |
| 189 | output.WithSummary(fmt.Sprintf("Journal entry for %s", date)), |
| 190 | output.WithBreadcrumbs(output.Breadcrumb{ |
| 191 | Action: "write", |
| 192 | Command: fmt.Sprintf("hey journal write %s '...'", date), |
| 193 | Description: "Edit this journal entry", |
| 194 | }), |
| 195 | ) |
| 196 | } |
| 197 | |
| 198 | // write |
| 199 | |
| 200 | type journalWriteCommand struct { |
| 201 | cmd *cobra.Command |
| 202 | content string |
| 203 | contentHTML string |
| 204 | } |
| 205 | |
| 206 | func newJournalWriteCommand() *journalWriteCommand { |
| 207 | journalWriteCommand := &journalWriteCommand{} |
| 208 | journalWriteCommand.cmd = &cobra.Command{ |
| 209 | Use: "write [date] [content]", |