aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 6fcdd00..52ea628 100644
--- a/main.go
+++ b/main.go
@@ -146,12 +146,13 @@ func work(ctx context.Context, opts *options.Options, cli *http.Client, question
cctx, cancel := context.WithTimeout(ctx, opts.Timeout)
defer cancel()
+ answer := qna.Answer{Domain: question.Domain}
req, err := http.NewRequestWithContext(cctx, http.MethodGet, "https://"+question.Domain, nil)
if err != nil {
+ answerCh <- answer
return
}
- answer := qna.Answer{Domain: question.Domain}
rsp, err := cli.Do(req)
if err != nil {
answerCh <- answer