diff --git a/dev/envvardoc/envvardoc.go b/dev/envvardoc/envvardoc.go index 32597ad06..f5276b599 100644 --- a/dev/envvardoc/envvardoc.go +++ b/dev/envvardoc/envvardoc.go @@ -43,7 +43,7 @@ type varMap map[string][]pos func sortedKeys(m varMap) []string { keys := make([]string, 0, len(m)) - for k, _ := range m { + for k := range m { keys = append(keys, k) } sort.Strings(keys) diff --git a/misc/docker/dock.go b/misc/docker/dock.go index 73516267f..eb62f1d55 100644 --- a/misc/docker/dock.go +++ b/misc/docker/dock.go @@ -434,7 +434,7 @@ func packBinaries(ctxDir string) { binaries["cammount"] = false } toPack := func(bin string) bool { - for k, _ := range binaries { + for k := range binaries { if bin == k { binaries[k] = true return true diff --git a/pkg/client/remove.go b/pkg/client/remove.go index 703eca5b6..93614cbcb 100644 --- a/pkg/client/remove.go +++ b/pkg/client/remove.go @@ -89,7 +89,7 @@ func (c *Client) RemoveBlob(b blob.Ref) error { func stringKeys(m map[string]bool) (s []string) { s = make([]string, 0, len(m)) - for key, _ := range m { + for key := range m { s = append(s, key) } return diff --git a/pkg/deploy/gce/handler.go b/pkg/deploy/gce/handler.go index 2f2fde195..28051353a 100644 --- a/pkg/deploy/gce/handler.go +++ b/pkg/deploy/gce/handler.go @@ -300,7 +300,7 @@ func (h *DeployHandler) refreshZones() error { defer h.zonesMu.Unlock() defer func() { h.regions = make([]string, 0, len(h.zones)) - for r, _ := range h.zones { + for r := range h.zones { h.regions = append(h.regions, r) } }() diff --git a/pkg/importer/flickr/testdata.go b/pkg/importer/flickr/testdata.go index 3da9e8b82..894b314c1 100644 --- a/pkg/importer/flickr/testdata.go +++ b/pkg/importer/flickr/testdata.go @@ -104,7 +104,7 @@ Content-Type: application/json; charset=UTF-8 apiURL, photosetAPIPath, page, photosetId, fakeUserId) response := fmt.Sprintf("%s%s", okHeader, fakePhotoset(photosetId, page, pages, photoIds[pageStart:pageEnd])) responses[photosURL] = httputil.StaticResponder(response) - for k, _ := range photoIds { + for k := range photoIds { if k < pageEnd { continue } diff --git a/pkg/importer/importer.go b/pkg/importer/importer.go index 20c101266..8288d1ea5 100644 --- a/pkg/importer/importer.go +++ b/pkg/importer/importer.go @@ -223,7 +223,7 @@ func newFromConfig(ld blobserver.Loader, cfg jsonconfig.Obj) (http.Handler, erro } ClientId := make(map[string]string) ClientSecret := make(map[string]string) - for k, _ := range importers { + for k := range importers { var clientId, clientSecret string if impConf := cfg.OptionalObject(k); impConf != nil { clientId = impConf.OptionalString("clientID", "") diff --git a/pkg/index/receive.go b/pkg/index/receive.go index e2e6a45c7..26fd86057 100644 --- a/pkg/index/receive.go +++ b/pkg/index/receive.go @@ -143,7 +143,7 @@ func (ix *Index) indexReadyBlobs() { } ix.Lock() defer ix.Unlock() - for br, _ := range failed { + for br := range failed { ix.readyReindex[br] = true } } diff --git a/pkg/misc/closure/gendeps.go b/pkg/misc/closure/gendeps.go index 9424d9922..36824c11a 100644 --- a/pkg/misc/closure/gendeps.go +++ b/pkg/misc/closure/gendeps.go @@ -221,7 +221,7 @@ func DeepParseDeps(r io.Reader) (map[string][]string, error) { } return jsfiles } - for namespace, _ := range providedBy { + for namespace := range providedBy { filesDeps[namespace] = deeperDeps(namespace) } return filesDeps, nil diff --git a/pkg/server/download.go b/pkg/server/download.go index b2270f206..433d75da7 100644 --- a/pkg/server/download.go +++ b/pkg/server/download.go @@ -502,7 +502,7 @@ func (dh *DownloadHandler) serveZip(w http.ResponseWriter, r *http.Request) { h.Set("Content-Disposition", "attachment; filename="+zipName) zw := zip.NewWriter(w) dh.r = r - for br, _ := range allRefs { + for br := range allRefs { if err := dh.zipFile("", br, zw); err != nil { log.Printf("error zipping %v: %v", br, err) // http.Error is of no use since we've already started sending a response diff --git a/pkg/sorted/kvtest/kvtest.go b/pkg/sorted/kvtest/kvtest.go index 115b1655a..8d0f74b5e 100644 --- a/pkg/sorted/kvtest/kvtest.go +++ b/pkg/sorted/kvtest/kvtest.go @@ -120,12 +120,12 @@ func testInsertLarge(t *testing.T, kv sorted.KeyValue) { largeKey := make([]byte, sorted.MaxKeySize-1) // setting all the bytes because postgres whines about an invalid byte sequence // otherwise - for k, _ := range largeKey { + for k := range largeKey { largeKey[k] = 'A' } largeKey[sorted.MaxKeySize-2] = 'B' largeValue := make([]byte, sorted.MaxValueSize-1) - for k, _ := range largeValue { + for k := range largeValue { largeValue[k] = 'A' } largeValue[sorted.MaxValueSize-2] = 'B'