aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/qna/qna.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/qna/qna.go b/internal/qna/qna.go
index aa27d07..d883016 100644
--- a/internal/qna/qna.go
+++ b/internal/qna/qna.go
@@ -128,3 +128,10 @@ func isDeadlineError(err error) bool {
urlErr, ok := err.(*url.Error)
return ok && errors.Is(urlErr.Err, context.DeadlineExceeded)
}
+
+func TrimWildcard(san string) string {
+ if len(san) >= 2 && san[:2] == "*." {
+ return san[2:]
+ }
+ return san
+}