(version string)
| 90 | } |
| 91 | |
| 92 | func parseSemver(version string) plugin.VersionType { |
| 93 | mmb := strings.Split(version, ".") |
| 94 | if len(mmb) != 3 { |
| 95 | panic("invalid version: " + version) |
| 96 | } |
| 97 | major, _ := strconv.Atoi(mmb[0]) |
| 98 | minor, _ := strconv.Atoi(mmb[1]) |
| 99 | build, _ := strconv.Atoi(mmb[2]) |
| 100 | |
| 101 | return plugin.VersionType{ |
| 102 | Major: major, |
| 103 | Minor: minor, |
| 104 | Build: build, |
| 105 | } |
| 106 | } |