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

Function verifyWorkspaceOutdated

cli/ssh.go:1191–1198  ·  view source on GitHub ↗

Verify if the user workspace is outdated and prepare an actionable message for user.

(client *codersdk.Client, workspace codersdk.Workspace)

Source from the content-addressed store, hash-verified

1189
1190// Verify if the user workspace is outdated and prepare an actionable message for user.
1191func verifyWorkspaceOutdated(client *codersdk.Client, workspace codersdk.Workspace) (string, bool) {
1192 if !workspace.Outdated {
1193 return "", false // workspace is up-to-date
1194 }
1195
1196 workspaceLink := buildWorkspaceLink(client.URL, workspace)
1197 return fmt.Sprintf("👋 Your workspace is outdated! Update it here: %s\n", workspaceLink), true
1198}
1199
1200// Build the user workspace link which navigates to the Coder web UI.
1201func buildWorkspaceLink(serverURL *url.URL, workspace codersdk.Workspace) *url.URL {

Callers 2

sshMethod · 0.85

Calls 1

buildWorkspaceLinkFunction · 0.85

Tested by 1