commit cd650fa0097f948b15dddd889ad2e6908b58bd66 Author: Cecylia Bocovich cohosh@torproject.org Date: Tue May 28 13:58:16 2019 -0400
Keyed composite literal to avoid go vet warning --- client/lib/rendezvous.go | 2 +- proxy-go/snowflake.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/lib/rendezvous.go b/client/lib/rendezvous.go index cd26f6e..54ce459 100644 --- a/client/lib/rendezvous.go +++ b/client/lib/rendezvous.go @@ -67,7 +67,7 @@ func NewBrokerChannel(broker string, front string, transport http.RoundTripper) }
func limitedRead(r io.Reader, limit int64) ([]byte, error) { - p, err := ioutil.ReadAll(&io.LimitedReader{r, limit + 1}) + p, err := ioutil.ReadAll(&io.LimitedReader{R: r, N: limit + 1}) if err != nil { return p, err } else if int64(len(p)) == limit+1 { diff --git a/proxy-go/snowflake.go b/proxy-go/snowflake.go index 27eb9a3..b3c863a 100644 --- a/proxy-go/snowflake.go +++ b/proxy-go/snowflake.go @@ -140,7 +140,7 @@ func genSessionID() string { }
func limitedRead(r io.Reader, limit int64) ([]byte, error) { - p, err := ioutil.ReadAll(&io.LimitedReader{r, limit + 1}) + p, err := ioutil.ReadAll(&io.LimitedReader{R: r, N: limit + 1}) if err != nil { return p, err } else if int64(len(p)) == limit+1 {
tor-commits@lists.torproject.org