github.com/golangci/go-tools@v0.0.0-20190318060251-af6baa5dc196/simple/testdata/src/contains/contains.go (about) 1 package pkg 2 3 import ( 4 "bytes" 5 "strings" 6 ) 7 8 func fn() { 9 _ = strings.IndexRune("", 'x') > -1 // MATCH / strings.ContainsRune/ 10 _ = strings.IndexRune("", 'x') >= 0 // MATCH / strings.ContainsRune/ 11 _ = strings.IndexRune("", 'x') > 0 12 _ = strings.IndexRune("", 'x') >= -1 13 _ = strings.IndexRune("", 'x') != -1 // MATCH / strings.ContainsRune/ 14 _ = strings.IndexRune("", 'x') == -1 // MATCH /!strings.ContainsRune/ 15 _ = strings.IndexRune("", 'x') != 0 16 _ = strings.IndexRune("", 'x') < 0 // MATCH /!strings.ContainsRune/ 17 18 _ = strings.IndexAny("", "") > -1 // MATCH / strings.ContainsAny/ 19 _ = strings.IndexAny("", "") >= 0 // MATCH / strings.ContainsAny/ 20 _ = strings.IndexAny("", "") > 0 21 _ = strings.IndexAny("", "") >= -1 22 _ = strings.IndexAny("", "") != -1 // MATCH / strings.ContainsAny/ 23 _ = strings.IndexAny("", "") == -1 // MATCH /!strings.ContainsAny/ 24 _ = strings.IndexAny("", "") != 0 25 _ = strings.IndexAny("", "") < 0 // MATCH /!strings.ContainsAny/ 26 27 _ = strings.Index("", "") > -1 // MATCH / strings.Contains/ 28 _ = strings.Index("", "") >= 0 // MATCH / strings.Contains/ 29 _ = strings.Index("", "") > 0 30 _ = strings.Index("", "") >= -1 31 _ = strings.Index("", "") != -1 // MATCH / strings.Contains/ 32 _ = strings.Index("", "") == -1 // MATCH /!strings.Contains/ 33 _ = strings.Index("", "") != 0 34 _ = strings.Index("", "") < 0 // MATCH /!strings.Contains/ 35 36 _ = bytes.IndexRune(nil, 'x') > -1 // MATCH / bytes.ContainsRune/ 37 _ = bytes.IndexAny(nil, "") > -1 // MATCH / bytes.ContainsAny/ 38 _ = bytes.Index(nil, nil) > -1 // MATCH / bytes.Contains/ 39 }