Documentation
¶
Overview ¶
Package undo implements the append-only transaction journal from SPEC §6.3. Each forward mutation records one transaction capturing the before-images of every task line it touched (added, changed, or removed), keyed by ULID. Undo pops the last transaction and restores those before-images. The journal is written under the tasks.txt lock, in the same critical section as the mutation, so "last" is well-defined across processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
ID string `json:"id"`
Before string `json:"before,omitempty"`
After string `json:"after,omitempty"`
}
Change records one task's before/after raw lines. An empty Before means the task was newly added (undo deletes it); an empty After means it was removed (undo re-adds it).
Click to show internal directories.
Click to hide internal directories.