From ecca93a9a27ba965ef592fd496d4b504da8628b0 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sun, 2 Apr 2023 15:01:47 +0200 Subject: Minor edits and renaming --- internal/qna/qna.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/qna') 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 +} -- cgit v1.2.3