go-errhttp/preconditionfailed.go

42 lines
813 B
Go
Raw Normal View History

2017-02-06 20:58:13 +00:00
package errhttp
var _ Error = internalPreconditionFailed{}
var _ PreconditionFailed = internalPreconditionFailed{}
var ErrPreconditionFailed error = PreconditionFailedWrap(nil)
2017-02-06 20:58:13 +00:00
type PreconditionFailed interface {
ClientError
PreconditionFailed()
}
type internalPreconditionFailed struct {
err error
}
func PreconditionFailedWrap(err error) error {
return internalPreconditionFailed{
err:err,
}
}
func (receiver internalPreconditionFailed) Error() string {
return receiver.err.Error()
}
func (internalPreconditionFailed) ErrHTTP() {
// Nothing here.
}
2017-02-06 20:58:13 +00:00
func (internalPreconditionFailed) ClientError() {
// Nothing here.
}
func (internalPreconditionFailed) PreconditionFailed() {
// Nothing here.
}
func (receiver internalPreconditionFailed) Unwrap() error {
return receiver.err
}