go-errhttp/loopdetected.go

44 lines
756 B
Go
Raw Normal View History

2017-02-06 21:14:15 +00:00
package errhttp
var _ Error = internalLoopDetected{}
var _ LoopDetected = internalLoopDetected{}
var ErrLoopDetected error = LoopDetectedWrap(nil)
2017-02-06 21:14:15 +00:00
type LoopDetected interface {
ServerError
LoopDetected()
}
var _ LoopDetected = internalLoopDetected{}
2017-02-06 21:14:15 +00:00
type internalLoopDetected struct {
err error
}
func LoopDetectedWrap(err error) error {
return internalLoopDetected{
err:err,
}
}
func (receiver internalLoopDetected) Error() string {
return receiver.err.Error()
}
func (internalLoopDetected) ErrHTTP() {
// Nothing here.
}
2017-02-06 21:14:15 +00:00
func (internalLoopDetected) ServerError() {
// Nothing here.
}
func (internalLoopDetected) LoopDetected() {
// Nothing here.
}
func (receiver internalLoopDetected) Unwrap() error {
return receiver.err
}