| 1 |
// Copyright 2020 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
package testdata |
| 6 |
|
| 7 |
import "log" |
| 8 |
|
| 9 |
func m() { |
| 10 |
maps := make(map[string]string) |
| 11 |
for k := range maps { // want "simplify range expression" |
| 12 |
log.Println(k) |
| 13 |
} |
| 14 |
for range maps { // want "simplify range expression" |
| 15 |
} |
| 16 |
for range maps { // want "simplify range expression" |
| 17 |
} |
| 18 |
for _, v := range maps { // nope |
| 19 |
println(v) |
| 20 |
} |
| 21 |
for range maps { // nope |
| 22 |
} |
| 23 |
} |