Skip to content
Snippets Groups Projects

WIP: Develop

Merged Malte Bauch requested to merge develop into master
21 files
+ 56
88
Compare changes
  • Side-by-side
  • Inline
Files
21
@@ -23,17 +23,6 @@ func (e *ErrNil) Error() string {
@@ -23,17 +23,6 @@ func (e *ErrNil) Error() string {
return fmt.Sprintf("struct cannot be nil")
return fmt.Sprintf("struct cannot be nil")
}
}
// ErrNotFound implements the Error interface and is called if a specific ID
// of a storable item could not be found.
type ErrNotFound struct {
ID interface{}
Name interface{}
}
func (e *ErrNotFound) Error() string {
return fmt.Sprintf("ID: %v or Name: %v not found", e.ID, e.Name)
}
// ErrAlreadyExists implements the Error interface and is called if a specific ID
// ErrAlreadyExists implements the Error interface and is called if a specific ID
// of a storable item already exists.
// of a storable item already exists.
type ErrAlreadyExists struct {
type ErrAlreadyExists struct {
@@ -193,11 +182,12 @@ func (e ErrCouldNotUpdate) Error() string {
@@ -193,11 +182,12 @@ func (e ErrCouldNotUpdate) Error() string {
// ErrCouldNotFind implements the Error interface and is called if a
// ErrCouldNotFind implements the Error interface and is called if a
// stored item can not be found.
// stored item can not be found.
type ErrCouldNotFind struct {
type ErrCouldNotFind struct {
StoreName string
ID any
 
Name string
}
}
func (e ErrCouldNotFind) Error() string {
func (e ErrCouldNotFind) Error() string {
return fmt.Sprintf("could not find %s", e.StoreName)
return fmt.Sprintf("ID: %v or Name: %v not found", e.ID, e.Name)
}
}
// ErrCouldNotCreate implements the Error interface and is called if a
// ErrCouldNotCreate implements the Error interface and is called if a
Loading