perf: avoid unnecessary byte/string conversion (#10012)

We can use alternative functions to avoid unnecessary byte/string
conversion calls and reduce allocations.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun 2023-06-01 22:29:47 +08:00 committed by GitHub
parent 19de8af350
commit d02ba28b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -197,7 +197,7 @@ func dumpSecretAuthMap(filename string, secret *api.Secret) error {
for user, pass := range secret.Data {
builder.WriteString(user)
builder.WriteString(":")
builder.WriteString(string(pass))
builder.Write(pass)
builder.WriteString("\n")
}