github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/checkStdlibUsageUTF8Cutset.go (about) 1 package pkg 2 3 import "strings" 4 5 func fn() { 6 println(strings.Trim("\x80test\xff", "\xff")) // MATCH /is not a valid UTF-8 encoded string/ 7 println(strings.Trim("foo", "bar")) 8 9 s := "\xff" 10 if true { 11 s = "" 12 } 13 println(strings.Trim("", s)) 14 }