.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / stylecheck / testdata / src / CheckYodaConditions / CheckYodaConditions.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/stylecheck/testdata/src/CheckYodaConditions/CheckYodaConditions.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/stylecheck/testdata/src/CheckYodaConditions/CheckYodaConditions.go
new file mode 100644 (file)
index 0000000..94e3c6c
--- /dev/null
@@ -0,0 +1,16 @@
+// Package pkg ...
+package pkg
+
+func fn(x string, y int) {
+       if "" == x { // want `Yoda`
+       }
+       if 0 == y { // want `Yoda`
+       }
+       if 0 > y {
+       }
+       if "" == "" {
+       }
+
+       if "" == "" || 0 == y { // want `Yoda`
+       }
+}