parent
4dae8ca837
commit
45b487eb32
@ -1,26 +1,30 @@
|
||||
package sorted
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitlab.com/Pixdigit/uniqueID"
|
||||
)
|
||||
|
||||
//List is empty
|
||||
type ErrListEmpty struct {
|
||||
S string
|
||||
}
|
||||
|
||||
func (err ErrListEmpty) Error() string {
|
||||
return err.S
|
||||
return "list is empty"
|
||||
}
|
||||
|
||||
type ErrDuplicateElem struct {
|
||||
S string
|
||||
DuplicateID uniqueID.ID
|
||||
}
|
||||
|
||||
func (err ErrDuplicateElem) Error() string {
|
||||
return err.S
|
||||
return fmt.Sprint("Duplicate element with ID = ", err.DuplicateID)
|
||||
}
|
||||
|
||||
type ErrNoElem struct {
|
||||
S string
|
||||
MissingID uniqueID.ID
|
||||
}
|
||||
|
||||
func (err ErrNoElem) Error() string {
|
||||
return err.S
|
||||
return fmt.Sprint("no element with ID =", err.MissingID)
|
||||
}
|
||||
|
Loading…
Reference in new issue