diff options
author | Rasmus Dahlberg <rasmus@rgdd.se> | 2023-04-02 22:15:03 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@rgdd.se> | 2023-04-02 22:15:03 +0200 |
commit | f6c1eb7e58a5fc70e720311482f8147b791e6104 (patch) | |
tree | 4073bc0b2ae416252d02056839ca53b09941d39b | |
parent | 816f3da4d3c04cdf6c277e9083238b1377a46c74 (diff) |
Minor edit
-rw-r--r-- | internal/qna/qna.go | 4 | ||||
-rw-r--r-- | main.go | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/internal/qna/qna.go b/internal/qna/qna.go index f8e6bd8..eab4b71 100644 --- a/internal/qna/qna.go +++ b/internal/qna/qna.go @@ -39,6 +39,10 @@ func (a Answer) String() string { return fmt.Sprintf("%s header=%s attribute=%s", a.Domain, a.HTTP, a.HTML) } +func (a *Answer) OnionLocation() bool { + return a.HTTP != "" || a.HTML != "" +} + type Progress struct { NumOK int NumOnion int @@ -144,7 +144,7 @@ func workReceiver(ctx context.Context, opts options.Options, answerCh chan qna.A p := qna.Progress{} handleAnswer := func(a qna.Answer) { p.AddAnswer(a) - if a.HTTP != "" || a.HTML != "" { + if a.OnionLocation() { fmt.Printf("%s\n", a.String()) } } |