chore: avoid unnecessary byte/string conversion calls (#21854)

* chore: avoid unnecessary conversion calls

* add changelog entry

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
Ville Vesilehto
2023-08-08 20:50:54 +03:00
committed by GitHub
parent 4c8cc87794
commit eefd4529e9
10 changed files with 26 additions and 23 deletions

View File

@@ -161,7 +161,7 @@ func TestRedshift_NewUser(t *testing.T) {
}
usernameRegex := regexp.MustCompile("^v-test-test-[a-zA-Z0-9]{20}-[0-9]{10}$")
if !usernameRegex.Match([]byte(username)) {
if !usernameRegex.MatchString(username) {
t.Fatalf("Expected username %q to match regex %q", username, usernameRegex.String())
}
}