From: Matt Joiner Date: Thu, 21 Mar 2024 23:41:22 +0000 (+1100) Subject: Separate some long lines X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ebd20466b9c9357528844acb7cb6ba14a0c4e4ed;p=btrtrc.git Separate some long lines --- diff --git a/tracker/udp.go b/tracker/udp.go index cf681887..4c6c2a7d 100644 --- a/tracker/udp.go +++ b/tracker/udp.go @@ -29,7 +29,11 @@ func (c *udpClient) Close() error { return c.cl.Close() } -func (c *udpClient) Announce(ctx context.Context, req AnnounceRequest, opts trHttp.AnnounceOpt) (res AnnounceResponse, err error) { +func (c *udpClient) Announce( + ctx context.Context, + req AnnounceRequest, + opts trHttp.AnnounceOpt, +) (res AnnounceResponse, err error) { if req.IPAddress == 0 && opts.ClientIp4 != nil { // I think we're taking bytes in big-endian order (all IPs), and writing it to a natively // ordered uint32. This will be correctly ordered when written back out by the UDP client diff --git a/tracker/udp/client.go b/tracker/udp/client.go index 6b97ddcc..7f6d88a8 100644 --- a/tracker/udp/client.go +++ b/tracker/udp/client.go @@ -167,7 +167,12 @@ func (cl *Client) writeRequest( return } -func (cl *Client) requestWriter(ctx context.Context, action Action, body []byte, tId TransactionId) (err error) { +func (cl *Client) requestWriter( + ctx context.Context, + action Action, + body []byte, + tId TransactionId, +) (err error) { var buf bytes.Buffer for n := 0; ; n++ { err = cl.writeRequest(ctx, action, body, tId, &buf) @@ -192,7 +197,11 @@ func (me ErrorResponse) Error() string { return fmt.Sprintf("error response: %#q", me.Message) } -func (cl *Client) request(ctx context.Context, action Action, body []byte) (respBody []byte, addr net.Addr, err error) { +func (cl *Client) request( + ctx context.Context, + action Action, + body []byte, +) (respBody []byte, addr net.Addr, err error) { respChan := make(chan DispatchedResponse, 1) t := cl.Dispatcher.NewTransaction(func(dr DispatchedResponse) { respChan <- dr