Moved error types to their respective packages
All checks were successful
/ test (push) Successful in 13s
All checks were successful
/ test (push) Successful in 13s
This commit is contained in:
parent
735246bd38
commit
6dfa7ca00d
19 changed files with 134 additions and 118 deletions
|
@ -1,11 +1,6 @@
|
|||
package errors
|
||||
|
||||
// String is used for static errors that have no parameters.
|
||||
type String struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (err *String) Error() string {
|
||||
return err.Message
|
||||
// String creates a static error message without parameters.
|
||||
func String(message string) *static {
|
||||
return &static{Message: message}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue