go-errhttp/notfound.go

37 lines
549 B
Go
Raw Normal View History

2017-02-06 20:58:13 +00:00
package errhttp
type NotFound interface {
ClientError
NotFound ()
}
type internalNotFound struct {
err error
}
func NotFoundWrap(err error) error {
return internalNotFound {
err:err,
}
}
func (receiver internalNotFound ) Error() string {
return receiver.err.Error()
}
func (receiver internalNotFound ) Err() error {
return receiver.err
}
func (internalNotFound ) ClientError() {
// Nothing here.
}
func (internalNotFound ) NotFound() {
// Nothing here.
}
func (receiver internalNotFound) Unwrap() error {
return receiver.err
}