cmd/gogio: allow missing tool version components

This commit changes the way that gogio searches for build tools
so that it correctly identifies versions like '31' as equivalent
to '31.0.0'. The Android SDK appears to not provide version
components in the path name when the component is zero.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2022-01-04 11:29:56 -05:00
committed by Elias Naur
parent 9b7ec167bc
commit 99e3481419
-3
View File
@@ -955,9 +955,6 @@ loop:
for _, path := range paths {
name := filepath.Base(path)
s := strings.SplitN(name, ".", 3)
if len(s) != len(bestVer) {
continue
}
var version [3]int
for i, v := range s {
v, err := strconv.Atoi(v)