We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ea1afc commit d840a14Copy full SHA for d840a14
.gitignore
@@ -0,0 +1,2 @@
1
+.idea
2
+goconst
tests/main.go
@@ -27,7 +27,12 @@ func testCase() string {
27
case "moo":
28
return ""
29
}
30
- return "foo"
+
31
+ test2 := "moo" + fmt.Sprintf("%d", testInt())
32
+ if test2 > "foo" {
33
+ test2 += "foo"
34
+ }
35
+ return "foo" + test2
36
37
38
func testInt() int {
visitor.go
@@ -62,10 +62,6 @@ func (v *treeVisitor) Visit(node ast.Node) ast.Visitor {
62
63
// if foo == "moo"
64
case *ast.BinaryExpr:
65
- if t.Op != token.EQL && t.Op != token.NEQ {
66
- return v
67
- }
68
-
69
var lit *ast.BasicLit
70
var ok bool
71
0 commit comments