1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

sts: Use keyed fields in io.LimitedReader literal

Flagged by go vet:
internal/sts/sts.go:256: io.LimitedReader composite literal uses unkeyed fields
This commit is contained in:
Alberto Bertogli
2018-07-14 10:23:36 +01:00
parent 770a618c84
commit 644cd63eff

View File

@@ -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 // Read but up to 10k; policies should be way smaller than that, and
// having a limit prevents abuse/accidents with very large replies. // 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") var errRejectRedirect = errors.New("redirects not allowed in MTA-STS")