MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / parseSemver

Function parseSemver

multiapps_plugin.go:92–106  ·  view source on GitHub ↗
(version string)

Source from the content-addressed store, hash-verified

90}
91
92func 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}

Callers 1

GetMetadataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected