go-errhttp/networkauthenticationrequir...

33 lines
677 B
Go
Raw Normal View History

2017-02-06 21:14:15 +00:00
package errhttp
type NetworkAuthenticationRequired interface {
ServerError
NetworkAuthenticationRequired()
}
type internalNetworkAuthenticationRequired struct {
err error
}
func NetworkAuthenticationRequiredWrap(err error) error {
return internalNetworkAuthenticationRequired{
err:err,
}
}
func (receiver internalNetworkAuthenticationRequired) Error() string {
return receiver.err.Error()
}
func (receiver internalNetworkAuthenticationRequired) Err() error {
return receiver.err
}
func (internalNetworkAuthenticationRequired) ServerError() {
// Nothing here.
}
func (internalNetworkAuthenticationRequired) NetworkAuthenticationRequired() {
// Nothing here.
}