14 lines
168 B
Go
14 lines
168 B
Go
package errors
|
|
|
|
func New(text string) error {
|
|
return &errorString{text}
|
|
}
|
|
|
|
type errorString struct {
|
|
s string
|
|
}
|
|
|
|
func (e *errorString) Error() string {
|
|
return e.s
|
|
}
|