diff --git a/client/client.go b/client/client.go index 245a4029a19057765f53d11a254dea33da140855..3aa4e5bbb5c1b4261209196a7ea94da6d8e2220a 100644 --- a/client/client.go +++ b/client/client.go @@ -1,9 +1,7 @@ package client import ( - "bytes" "context" - "io" "net/textproto" "git.autistici.org/id/auth" @@ -47,11 +45,8 @@ func (c *socketClient) Authenticate(ctx context.Context, req *auth.Request) (*au go func() { defer close(done) - // Write the command to a buffer. - var buf bytes.Buffer - io.WriteString(&buf, "auth ") - buf.Write(c.codec.Encode(req)) - if err := conn.PrintfLine(buf.String()); err != nil { + // Write the auth command to the connection. + if err := conn.PrintfLine("auth %s", string(c.codec.Encode(req))); err != nil { done <- err return }