This commit is contained in:
parent
adfcd4b60c
commit
9b51680af5
8 changed files with 202 additions and 0 deletions
11
src/errors/String.go
Normal file
11
src/errors/String.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue