diff --git a/task/http_request.go b/task/http_request.go index 8eb1930..aac4eeb 100644 --- a/task/http_request.go +++ b/task/http_request.go @@ -19,6 +19,14 @@ type HttpRequest[T any] struct { err error } +func (r *HttpRequest[T]) Ans() T { + return r.ans +} + +func (r *HttpRequest[T]) Err() error { + return r.err +} + func (r *HttpRequest[T]) String() string { return fmt.Sprintf("%+v", r.ans) }