aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.go b/main.go
index fcd8bbf..569d9fe 100644
--- a/main.go
+++ b/main.go
@@ -237,7 +237,7 @@ func workGenerator(ctx context.Context, opts options.Options, fp *os.File, quest
select {
case <-ctx.Done():
return nextLine, false
- case questionCh <- qna.Question{Domain: scanner.Text()}:
+ case questionCh <- qna.Question{Domain: trimWildcard(scanner.Text())}:
nextLine++
readCount++
case <-metrics.C:
@@ -259,3 +259,10 @@ func workGenerator(ctx context.Context, opts options.Options, fp *os.File, quest
}
return nextLine, true
}
+
+func trimWildcard(san string) string {
+ if len(san) >= 2 && san[:2] == "*." {
+ return san[2:]
+ }
+ return san
+}