go-errhttp/requesturitoolong.go

47 lines
897 B
Go
Raw Normal View History

2017-02-06 20:58:13 +00:00
package errhttp
import (
"net/http"
)
var _ Error = internalRequestURITooLong{}
var _ ClientError = internalRequestURITooLong{}
var _ RequestURITooLong = internalRequestURITooLong{}
var ErrRequestURITooLong error = RequestURITooLongWrap(nil)
2017-02-06 20:58:13 +00:00
type RequestURITooLong interface {
ClientError
2017-02-06 20:58:13 +00:00
RequestURITooLong()
}
type internalRequestURITooLong struct {
err error
}
func RequestURITooLongWrap(err error) error {
return internalRequestURITooLong{
err:err,
}
}
func (receiver internalRequestURITooLong) Error() string {
return receiver.err.Error()
}
func (internalRequestURITooLong) ErrHTTP() int {
return http.StatusRequestURITooLong
}
2017-02-06 20:58:13 +00:00
func (internalRequestURITooLong) ClientError() {
// Nothing here.
}
func (internalRequestURITooLong) RequestURITooLong() {
// Nothing here.
}
func (receiver internalRequestURITooLong) Unwrap() error {
return receiver.err
}