MCPcopy Index your code
hub / github.com/coder/coder / serverVersionMessage

Function serverVersionMessage

cli/root.go:1563–1572  ·  view source on GitHub ↗

serverVersionMessage returns a warning message if the server version is a release candidate or development build. Returns empty string for stable versions. RC is checked before devel because RC dev builds (e.g. v2.33.0-rc.1-devel+hash) contain both tags.

(serverVersion string)

Source from the content-addressed store, hash-verified

1561// for stable versions. RC is checked before devel because RC dev
1562// builds (e.g. v2.33.0-rc.1-devel+hash) contain both tags.
1563func serverVersionMessage(serverVersion string) string {
1564 switch {
1565 case buildinfo.IsRCVersion(serverVersion):
1566 return fmt.Sprintf("the server is running a release candidate of Coder (%s)", serverVersion)
1567 case buildinfo.IsDevVersion(serverVersion):
1568 return fmt.Sprintf("the server is running a development version of Coder (%s)", serverVersion)
1569 default:
1570 return ""
1571 }
1572}
1573
1574// wrapTransportWithEntitlementsCheck adds a middleware to the HTTP transport
1575// that checks for entitlement warnings and prints them to the user.

Callers 2

Calls 2

IsRCVersionFunction · 0.92
IsDevVersionFunction · 0.92

Tested by 1