From 644cd63eff6fafc0debafae68718cccd1596459b Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sat, 14 Jul 2018 10:23:36 +0100 Subject: [PATCH] sts: Use keyed fields in io.LimitedReader literal Flagged by go vet: internal/sts/sts.go:256: io.LimitedReader composite literal uses unkeyed fields --- internal/sts/sts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sts/sts.go b/internal/sts/sts.go index 6e59911..b329182 100644 --- a/internal/sts/sts.go +++ b/internal/sts/sts.go @@ -253,7 +253,7 @@ func httpGet(ctx context.Context, url string) ([]byte, error) { // Read but up to 10k; policies should be way smaller than that, and // having a limit prevents abuse/accidents with very large replies. - return ioutil.ReadAll(&io.LimitedReader{resp.Body, 10 * 1024}) + return ioutil.ReadAll(&io.LimitedReader{R: resp.Body, N: 10 * 1024}) } var errRejectRedirect = errors.New("redirects not allowed in MTA-STS")