From b129b7cbc9fd9a9c11a77e5922861ef08893efa1 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Sat, 8 Jun 2024 20:36:04 -0700 Subject: Convert bespoke methods to io.Reader/io.Writer interfaces --- hotline/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hotline/client.go') diff --git a/hotline/client.go b/hotline/client.go index 35a7086..e056438 100644 --- a/hotline/client.go +++ b/hotline/client.go @@ -290,7 +290,7 @@ func handleGetFileNameList(ctx context.Context, c *Client, t *Transaction) (res for _, f := range t.Fields { var fn FileNameWithInfo - err = fn.UnmarshalBinary(f.Data) + _, err = fn.Write(f.Data) if err != nil { return nil, nil } @@ -649,7 +649,6 @@ func (c *Client) Disconnect() error { return c.Connection.Close() } - func (c *Client) HandleTransactions(ctx context.Context) error { // Create a new scanner for parsing incoming bytes into transaction tokens scanner := bufio.NewScanner(c.Connection) -- cgit