Skip to content

Cleanup and organise common variables and errors #119

@snehmatic

Description

@snehmatic

Some suggestions from @jakubdomanski. But there are definitely more that we can and should consolidate and organise.

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"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    corebusiness logic and backendgoPull requests that update go codegood first issueGood for newcomers

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions