We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e77d240 commit 69f18eeCopy full SHA for 69f18ee
test/testdata/wastedassign.go
@@ -9,19 +9,18 @@ func p(x int) int {
9
return x + 1
10
}
11
12
-func multiple(val interface{}, times uint) interface{} {
13
-
14
- switch hogehoge := val.(type) {
+func typeSwitchNoError(val interface{}, times uint) interface{} {
+ switch hoge := val.(type) {
15
case int:
16
return 12
17
case string:
18
- return strings.Repeat(hogehoge, int(times))
+ return strings.Repeat(hoge, int(times))
19
default:
20
return nil
21
22
23
24
-func noUseParams(params string) int {
+func noUseParamsNoError(params string) int {
25
a := 12
26
println(a)
27
return a
0 commit comments