mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Keyed composite literal to avoid go vet warning
This commit is contained in:
parent
254e6b9a3d
commit
cd650fa009
2 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue