add error to http request

This commit is contained in:
a 2022-03-26 21:43:59 -05:00
parent 489bc792e1
commit e33f80e57f

View File

@ -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)
}