.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / staticcheck / testdata / src / CheckBytesEqualIP / CheckBytesEqualIP.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckBytesEqualIP/CheckBytesEqualIP.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckBytesEqualIP/CheckBytesEqualIP.go
new file mode 100644 (file)
index 0000000..ea08330
--- /dev/null
@@ -0,0 +1,20 @@
+package pkg
+
+import (
+       "bytes"
+       "net"
+)
+
+func fn() {
+       type T []byte
+       var i1, i2 net.IP
+       var b1, b2 []byte
+       var t1, t2 T
+
+       bytes.Equal(i1, i2) // want `use net\.IP\.Equal to compare net\.IPs, not bytes\.Equal`
+       bytes.Equal(b1, b2)
+       bytes.Equal(t1, t2)
+
+       bytes.Equal(i1, b1)
+       bytes.Equal(b1, i1)
+}