1. Errors should be at package lvl = easier to compare in tests.
e.g.
var (
ErrSubTaskNotFound = errors.New("subtask not found")
ErrTaskNotFound = errors.New("task not found")
)
2. Magic strings.
task.Status = "completed"
vs
const (
StatusCompleted = "completed"
StatusPending = "pending"
)
Some suggestions from @jakubdomanski. But there are definitely more that we can and should consolidate and organise.