mirror of https://github.com/pulumi/pulumi.git
e845ddf4c4
This replaces for loops and slice appends reported by gosimple with simpler variants. Specifically, for _, x := range src { dst = append(dst, x) } // can be replaced with dst = append(dst, src...) And, for i, x := range src { dst[i] = x } // can be replaced with copy(dst, src) And, for true { ... } // can be replaced with for { ... } And, given a string `s`, for _, r := range []rune(s) { .. } // can be replaced with for _, r := range s { .. } Lastly, this fixes in ineffective break statement also reported by the linter. Inside a switch block, `break` affects the current `case` only. The outer loop needs a label. |
||
---|---|---|
.. | ||
testdata | ||
comments.go | ||
comments_test.go | ||
parser.go | ||
tokens.go | ||
utilities.go |