in client.go [81:97]
func getEndpoint(regional bool) (string, error) {
zone, err := getZone()
if err != nil {
return "", err
}
location := zone
if regional {
index := strings.LastIndex(location, "-")
if index == -1 {
return "", fmt.Errorf("zone %q is not a valid zone", zone)
}
location = location[:index]
}
return fmt.Sprintf("%s-agentcommunication.googleapis.com.:443", location), nil
}