()
| 215 | } |
| 216 | |
| 217 | func (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 | |
| 228 | var quotedPrefix = regexp.MustCompile(`[;"]/(\S+?/)[&"]`) |
| 229 |
no test coverage detected