mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 05:26:03 +03:00
[PR #211] [CLOSED] Use regexp compile #418
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#418
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/FiloSottile/mkcert/pull/211
Author: @CallanTaylor
Created: 11/5/2019
Status: ❌ Closed
Base:
master← Head:use-regexp-compile📝 Commits (3)
17159efUse regexp.Compile instead of regexp.MustCompile4e11eeecorrect assignment0f3cfa3Given the regex is constant we can make it a global instead of changing the line to regexp.Compile📊 Changes
2 files changed (+5 additions, -2 deletions)
View changed files
📝
cert.go(+2 -1)📝
main.go(+3 -1)📄 Description
The regexp.MustCompile function panics if the regex fails to compile and should only be used in globals or init functions. Instead use regexp.Compile and check
erris nil.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.