22 lines
325 B
Go
22 lines
325 B
Go
// args: -Egocritic
|
|
// config_path: testdata/configs/gocritic-fix.yml
|
|
package p
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func gocritic() {
|
|
var xs [2048]byte
|
|
|
|
// xs -> &xs
|
|
for _, x := range &xs {
|
|
print(x)
|
|
}
|
|
|
|
// strings.Count("foo", "bar") == 0 -> !strings.Contains("foo", "bar")
|
|
if !strings.Contains("foo", "bar") {
|
|
print("qu")
|
|
}
|
|
}
|