Function
compareVersion
(majorA, minorA, patchNumA, majorB, minorB, patchNumB int)
Source from the content-addressed store, hash-verified
| 27 | } |
| 28 | |
| 29 | func compareVersion(majorA, minorA, patchNumA, majorB, minorB, patchNumB int) bool { |
| 30 | if majorA != majorB { |
| 31 | return majorA > majorB |
| 32 | } |
| 33 | if minorA != minorB { |
| 34 | return minorA > minorB |
| 35 | } |
| 36 | if patchNumA != patchNumB { |
| 37 | return patchNumA > patchNumB |
| 38 | } |
| 39 | return true |
| 40 | } |
| 41 | |
| 42 | func InitUpgradePatch() { |
| 43 | if !strings.HasPrefix(conf.Version, "v") { |
Tested by
no test coverage detected