diff --git a/task/http_request.go b/task/http_request.go index 794e63d..d05916e 100644 --- a/task/http_request.go +++ b/task/http_request.go @@ -32,6 +32,12 @@ func (r *HttpRequest[T]) String() string { return fmt.Sprintf("%+v", r.ans) } +func (_ *HttpRequest[T]) NoErr() func(r *HttpRequest[T]) bool { + return func(r *HttpRequest[T]) bool { + return r.err == nil + } +} + func (_ *HttpRequest[T]) With(df DecoderFunc) func(r *HttpRequest[T]) *HttpRequest[T] { return func(r *HttpRequest[T]) *HttpRequest[T] { r.ans = *new(T) @@ -57,9 +63,3 @@ func (z *HttpRequest[T]) Xml() func(r *HttpRequest[T]) *HttpRequest[T] { return xml.NewDecoder(r) }) } - -func (_ *HttpRequest[T]) NoErr() func(r *HttpRequest[T]) bool { - return func(r *HttpRequest[T]) bool { - return r.err == nil - } -}