2017-02-06 20:58:13 +00:00
|
|
|
package errhttp
|
|
|
|
|
|
|
|
type LengthRequired interface {
|
|
|
|
ClientError
|
|
|
|
LengthRequired()
|
|
|
|
}
|
|
|
|
|
|
|
|
type internalLengthRequired struct {
|
|
|
|
err error
|
|
|
|
}
|
|
|
|
|
|
|
|
func LengthRequiredWrap(err error) error {
|
|
|
|
return internalLengthRequired{
|
|
|
|
err:err,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (receiver internalLengthRequired) Error() string {
|
|
|
|
return receiver.err.Error()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (receiver internalLengthRequired) Err() error {
|
|
|
|
return receiver.err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (internalLengthRequired) ClientError() {
|
|
|
|
// Nothing here.
|
|
|
|
}
|
|
|
|
|
|
|
|
func (internalLengthRequired) LengthRequired() {
|
|
|
|
// Nothing here.
|
|
|
|
}
|
|
|
|
|
2023-02-16 06:24:28 +00:00
|
|
|
func (receiver internalLengthRequired) Unwrap() error {
|
|
|
|
return receiver.err
|
|
|
|
}
|