Merge pull request #1233 from teresy/simplify-index

simplify cases of strings.Index with strings.Contains
This commit is contained in:
Zachary Yedidia 2018-12-10 14:27:45 -05:00 committed by GitHub
commit 49b6cf3673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -327,7 +327,7 @@ func expandWildcardVersion(parts [][]string) ([][]string, error) {
for _, p := range parts {
var newParts []string
for _, ap := range p {
if strings.Index(ap, "x") != -1 {
if strings.Contains(ap, "x") {
opStr, vStr, err := splitComparatorVersion(ap)
if err != nil {
return nil, err