mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-07 11:43:16 -06:00
tidy up
This commit is contained in:
parent
3e72a9757b
commit
accc8971d1
53 changed files with 896 additions and 486 deletions
|
|
@ -20,11 +20,16 @@ package db
|
|||
|
||||
import "fmt"
|
||||
|
||||
type DBError error
|
||||
// Error denotes a database error.
|
||||
type Error error
|
||||
|
||||
var (
|
||||
ErrNoEntries DBError = fmt.Errorf("no entries")
|
||||
ErrMultipleEntries DBError = fmt.Errorf("multiple entries")
|
||||
ErrAlreadyExists DBError = fmt.Errorf("already exists")
|
||||
ErrUnknown DBError = fmt.Errorf("unknown error")
|
||||
// ErrNoEntries is returned when a caller expected an entry for a query, but none was found.
|
||||
ErrNoEntries Error = fmt.Errorf("no entries")
|
||||
// ErrMultipleEntries is returned when a caller expected ONE entry for a query, but multiples were found.
|
||||
ErrMultipleEntries Error = fmt.Errorf("multiple entries")
|
||||
// ErrAlreadyExists is returned when a caller tries to insert a database entry that already exists in the db.
|
||||
ErrAlreadyExists Error = fmt.Errorf("already exists")
|
||||
// ErrUnknown denotes an unknown database error.
|
||||
ErrUnknown Error = fmt.Errorf("unknown error")
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue