diff --git a/some/some.go b/some/some.go new file mode 100644 index 0000000..bc29e63 --- /dev/null +++ b/some/some.go @@ -0,0 +1,29 @@ +package some + +import "log" + +func withIssue() { + log.Printf("bad format: %s", 1) +} + +func withAnotherIssue() { + a := 1 + if a != 0 { + return + } else { + panic(a) + } +} + +func testScopeLint() { + funcs := []func(){} + for _, v := range []int{1, 2} { + funcs = append(funcs, func() { + log.Print(v) + }) + } + + for _, f := range funcs { + f() + } +}