go-errhttp/payloadtoolarge.go

43 lines
812 B
Go
Raw Normal View History

2019-07-19 23:33:55 +00:00
package errhttp
var _ Error = internalPayloadTooLarge{}
var _ ClientError = internalPayloadTooLarge{}
var _ PayloadTooLarge = internalPayloadTooLarge{}
var ErrPayloadTooLarge error = PayloadTooLargeWrap(nil)
2019-07-19 23:33:55 +00:00
type PayloadTooLarge interface {
ClientError
PayloadTooLarge()
}
type internalPayloadTooLarge struct {
err error
}
func PayloadTooLargeWrap(err error) error {
return internalPayloadTooLarge{
err:err,
}
}
func (receiver internalPayloadTooLarge) Error() string {
return receiver.err.Error()
}
func (internalPayloadTooLarge) ErrHTTP() {
// Nothing here.
}
2019-07-19 23:33:55 +00:00
func (internalPayloadTooLarge) ClientError() {
// Nothing here.
}
func (internalPayloadTooLarge) PayloadTooLarge() {
// Nothing here.
}
func (receiver internalPayloadTooLarge) Unwrap() error {
return receiver.err
}