add error to http request

This commit is contained in:
a 2022-03-26 21:43:59 -05:00
parent 489bc792e1
commit e33f80e57f
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,14 @@ type HttpRequest[T any] struct {
err error 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 { func (r *HttpRequest[T]) String() string {
return fmt.Sprintf("%+v", r.ans) return fmt.Sprintf("%+v", r.ans)
} }