go-errhttp/proxyauthrequired.go

47 lines
897 B
Go

package errhttp
import (
"net/http"
)
var _ Error = internalProxyAuthRequired{}
var _ ClientError = internalProxyAuthRequired{}
var _ ProxyAuthRequired = internalProxyAuthRequired{}
var ErrProxyAuthRequired error = ProxyAuthRequiredWrap(nil)
type ProxyAuthRequired interface {
ClientError
ProxyAuthRequired()
}
type internalProxyAuthRequired struct {
err error
}
func ProxyAuthRequiredWrap(err error) error {
return internalProxyAuthRequired{
err:err,
}
}
func (receiver internalProxyAuthRequired) Error() string {
return receiver.err.Error()
}
func (internalProxyAuthRequired) ErrHTTP() int {
return http.StatusProxyAuthRequired
}
func (internalProxyAuthRequired) ClientError() {
// Nothing here.
}
func (internalProxyAuthRequired) ProxyAuthRequired() {
// Nothing here.
}
func (receiver internalProxyAuthRequired) Unwrap() error {
return receiver.err
}