aboutsummaryrefslogtreecommitdiff
path: root/internal/qna
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 15:01:47 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 15:01:47 +0200
commitecca93a9a27ba965ef592fd496d4b504da8628b0 (patch)
tree3bd1024570a0b9fb9d092f515d2c0384383aef14 /internal/qna
parent5e3af2cb3c003f4c328478ec9d938f103f5c08a6 (diff)
Minor edits and renaming
Diffstat (limited to 'internal/qna')
-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
+}