From f9c290890f826be2cbf34f4521809af822427298 Mon Sep 17 00:00:00 2001 From: Oleg Butuzov Date: Wed, 20 Oct 2021 09:36:53 +0300 Subject: [PATCH] refactor: replace (*bytes.Buffer).WriteString with (*bytes.Buffer).Write This PR change one method of bytes.Buffer struct package with a similar one, as result - code produce less allocations on heap. --- command/acl/authmethod/formatter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/acl/authmethod/formatter.go b/command/acl/authmethod/formatter.go index 2628f55805..35b428c7fc 100644 --- a/command/acl/authmethod/formatter.go +++ b/command/acl/authmethod/formatter.go @@ -80,7 +80,7 @@ func (f *prettyFormatter) FormatAuthMethod(method *api.ACLAuthMethod) (string, e if err != nil { return "", fmt.Errorf("Error formatting auth method configuration: %s", err) } - buffer.WriteString(string(output)) + buffer.Write(output) return buffer.String(), nil }