(first, second string)
| 330 | } |
| 331 | |
| 332 | func (t Toolchain) compareVersion(first, second string) int { |
| 333 | firstVersion := strings.Split(first, ".") |
| 334 | secondVersion := strings.Split(second, ".") |
| 335 | for i := 0; i < len(firstVersion) && i < len(secondVersion); i++ { |
| 336 | firstInt, _ := strconv.Atoi(firstVersion[i]) |
| 337 | secondInt, _ := strconv.Atoi(secondVersion[i]) |
| 338 | if firstInt != secondInt { |
| 339 | return firstInt - secondInt |
| 340 | } |
| 341 | } |
| 342 | return len(firstVersion) - len(secondVersion) |
| 343 | } |
| 344 | |
| 345 | func (w *WindowsKit) Detect(msvc *context.MSVC) error { |
| 346 | // Check if installed. |
no outgoing calls
no test coverage detected