Skip to content
Snippets Groups Projects
Commit cd650fa0 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Keyed composite literal to avoid go vet warning

parent 254e6b9a
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment