add error to http request
This commit is contained in:
parent
489bc792e1
commit
e33f80e57f
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue