honnef.co/go/tools@v0.5.0-0.dev.0.20240520180541-dcae280a5e87/staticcheck/sa1018/testdata/src/example.com/CheckStringsReplaceZero/CheckStringsReplaceZero.go (about) 1 package pkg 2 3 import "strings" 4 5 func fn() { 6 _ = strings.Replace("", "", "", 0) //@ diag(`calling strings.Replace with n == 0`) 7 _ = strings.Replace("", "", "", -1) 8 _ = strings.Replace("", "", "", 1) 9 }