MCPcopy Index your code
hub / github.com/perkeep/perkeep / googleCloudConsole

Method googleCloudConsole

pkg/server/status.go:217–226  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215}
216
217func (sh *StatusHandler) googleCloudConsole() (string, error) {
218 if !env.OnGCE() {
219 return "", errors.New("not on GCE")
220 }
221 projID, err := metadata.ProjectID()
222 if err != nil {
223 return "", fmt.Errorf("Error getting project ID: %v", err)
224 }
225 return "https://console.cloud.google.com/compute/instances?project=" + projID, nil
226}
227
228var quotedPrefix = regexp.MustCompile(`[;"]/(\S+?/)[&"]`)
229

Callers 1

serveStatusHTMLMethod · 0.95

Calls 1

OnGCEFunction · 0.92

Tested by

no test coverage detected