errhttp.URITooLong

master
Charles Iliya Krempeaux 2019-07-19 16:50:18 -07:00
parent 597db4e001
commit ed36b20373
2 changed files with 46 additions and 0 deletions

32
uritoolong.go 100644
View File

@ -0,0 +1,32 @@
package errhttp
type URITooLong interface {
ClientError
URITooLong()
}
type internalURITooLong struct {
err error
}
func URITooLongWrap(err error) error {
return internalURITooLong{
err:err,
}
}
func (receiver internalURITooLong) Error() string {
return receiver.err.Error()
}
func (receiver internalURITooLong) Err() error {
return receiver.err
}
func (internalURITooLong) ClientError() {
// Nothing here.
}
func (internalURITooLong) URITooLong() {
// Nothing here.
}

14
uritoolong_test.go 100644
View File

@ -0,0 +1,14 @@
package errhttp
import (
"testing"
)
func TestURITooLong(t *testing.T) {
var x URITooLong = internalURITooLong{} // THIS IS THE LINE THAT ACTUALLY MATTERS IN THIS TEST.
if nil == x {
t.Errorf("This should not happen.")
}
}