MCPcopy Index your code
hub / github.com/cloudfoundry/cli / SetVersion

Function SetVersion

version/version.go:22–36  ·  view source on GitHub ↗
(version string)

Source from the content-addressed store, hash-verified

20)
21
22func SetVersion(version string) {
23 if version == "" {
24 customVersion = ""
25 return
26 }
27
28 _, err := semver.Parse(version)
29
30 if err != nil {
31 fmt.Fprintf(os.Stderr, "Invalid semantic version format: %s\n", err)
32 ExitFunc(1)
33 }
34
35 customVersion = version
36}
37
38func VersionString() string {
39 if customVersion != "" {

Callers 1

version_test.goFile · 0.92

Calls 1

ParseMethod · 0.65

Tested by

no test coverage detected