Files
warewulf/internal/pkg/errors/errors.go
Gregory Kurtzer 78de883339 Lots of updates...
2020-11-03 17:58:41 -08:00

20 lines
319 B
Go

package errors
type error interface {
Error() string
}
// errorString is a trivial implementation of error.
type errorString struct {
s string
}
func (e *errorString) Error() string {
return e.s
}
// New returns an error that formats as the given text.
func New(text string) error {
return &errorString{text}
}