Skip to content
Snippets Groups Projects

Resolve "Getting a device from the file store system only works with ID"

4 files
+ 12
11
Compare changes
  • Side-by-side
  • Inline

Files

@@ -24,11 +24,12 @@ func (e *ErrNil) Error() string {
// 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{}
ID interface{}
Name interface{}
}
func (e *ErrNotFound) Error() string {
return fmt.Sprintf("%v not found", e.ID)
return fmt.Sprintf("ID: %v or Name: %vnot found", e.ID, e.Name)
}
// ErrAlreadyExists implements the Error interface and is called if a specific ID
Loading