cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694)

This commit is contained in:
Mayo
2021-09-30 19:33:14 +08:00
committed by GitHub
parent d58b9c36e1
commit b834c518e2
20 changed files with 91 additions and 91 deletions

View File

@@ -121,9 +121,9 @@ func parseDecryptAndTestUnsealKeys(t *testing.T,
testFunc := func(bkeys map[string][]string) {
var re *regexp.Regexp
if fingerprints {
re, err = regexp.Compile("\\s*Key\\s+\\d+\\s+fingerprint:\\s+([0-9a-fA-F]+);\\s+value:\\s+(.*)")
re, err = regexp.Compile(`\s*Key\s+\d+\s+fingerprint:\s+([0-9a-fA-F]+);\s+value:\s+(.*)`)
} else {
re, err = regexp.Compile("\\s*Key\\s+\\d+:\\s+(.*)")
re, err = regexp.Compile(`\s*Key\s+\d+:\s+(.*)`)
}
if err != nil {
t.Fatalf("Error compiling regex: %s", err)