From 152390e80a7585098d590b0b7c7633c80d791339 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Mon, 23 Oct 2023 11:15:25 -0700 Subject: [PATCH] ipn/localapi: avoid unkeyed literal (#9933) Go has no way to explicitly identify Go struct as effectively a tuple, so staticcheck assumes any external use of unkeyed literals is wrong. Updates #cleanup Signed-off-by: Joe Tsai --- ipn/localapi/localapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipn/localapi/localapi.go b/ipn/localapi/localapi.go index ef820537f..5f3f282e8 100644 --- a/ipn/localapi/localapi.go +++ b/ipn/localapi/localapi.go @@ -1360,7 +1360,7 @@ func (h *Handler) serveFilePut(w http.ResponseWriter, r *http.Request) { outReq.ContentLength = r.ContentLength if offset > 0 { h.logf("resuming put at offset %d after %v", offset, resumeDuration) - rangeHdr, _ := httphdr.FormatRange([]httphdr.Range{{offset, 0}}) + rangeHdr, _ := httphdr.FormatRange([]httphdr.Range{{Start: offset, Length: 0}}) outReq.Header.Set("Range", rangeHdr) if outReq.ContentLength >= 0 { outReq.ContentLength -= offset