MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / normalizeVersion

Function normalizeVersion

internal/update/update.go:180–182  ·  view source on GitHub ↗

normalizeVersion strips the "v" prefix from version strings.

(v string)

Source from the content-addressed store, hash-verified

178
179// normalizeVersion strips the "v" prefix from version strings.
180func normalizeVersion(v string) string {
181 return strings.TrimPrefix(v, "v")
182}
183
184// baseVersion extracts the base semver from a git-describe version string.
185// For example, "0.4.0-61-gd06835b" returns "0.4.0".

Callers 5

CheckForUpdateFunction · 0.85
PerformUpdateFunction · 0.85
baseVersionFunction · 0.85
CompareVersionsFunction · 0.85
TestNormalizeVersionFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNormalizeVersionFunction · 0.68