diff --git a/cli/azd/pkg/auth/manager.go b/cli/azd/pkg/auth/manager.go index 236c373a3a6..c367c267b35 100644 --- a/cli/azd/pkg/auth/manager.go +++ b/cli/azd/pkg/auth/manager.go @@ -475,7 +475,7 @@ func (m *Manager) LoginInteractive( scopes []string, options *LoginInteractiveOptions) (azcore.TokenCredential, error) { if scopes == nil { - scopes = m.GetLoginScopes() + scopes = m.LoginScopes() } acquireTokenOptions := []public.AcquireInteractiveOption{} if options == nil { @@ -510,7 +510,7 @@ func (m *Manager) LoginInteractive( func (m *Manager) LoginWithDeviceCode( ctx context.Context, tenantID string, scopes []string, withOpenUrl WithOpenUrl) (azcore.TokenCredential, error) { if scopes == nil { - scopes = m.GetLoginScopes() + scopes = m.LoginScopes() } options := []public.AcquireByDeviceCodeOption{} if tenantID != "" { diff --git a/cli/azd/pkg/azapi/deployments.go b/cli/azd/pkg/azapi/deployments.go index 304a0051dc1..c1d5a37e679 100644 --- a/cli/azd/pkg/azapi/deployments.go +++ b/cli/azd/pkg/azapi/deployments.go @@ -17,7 +17,7 @@ import ( "github.com/azure/azure-dev/cli/azd/pkg/account" "github.com/azure/azure-dev/cli/azd/pkg/azsdk" "github.com/azure/azure-dev/cli/azd/pkg/azure" - azdCloud "github.com/azure/azure-dev/cli/azd/pkg/cloud" + "github.com/azure/azure-dev/cli/azd/pkg/cloud" "github.com/azure/azure-dev/cli/azd/pkg/httputil" ) @@ -91,13 +91,13 @@ type deployments struct { credentialProvider account.SubscriptionCredentialProvider httpClient httputil.HttpClient userAgent string - cloud *azdCloud.Cloud + cloud *cloud.Cloud } func NewDeployments( credentialProvider account.SubscriptionCredentialProvider, httpClient httputil.HttpClient, - cloud *azdCloud.Cloud, + cloud *cloud.Cloud, ) Deployments { return &deployments{ credentialProvider: credentialProvider, diff --git a/cli/azd/pkg/cloud/cloud.go b/cli/azd/pkg/cloud/cloud.go index 18d108da1d4..1ffc74f2117 100644 --- a/cli/azd/pkg/cloud/cloud.go +++ b/cli/azd/pkg/cloud/cloud.go @@ -33,7 +33,7 @@ type Config struct { } func NewCloud(config *Config) (*Cloud, error) { - if cloud, err := namedCloud(config.Name); err != nil { + if cloud, err := parseCloudName(config.Name); err != nil { return nil, err } else { return cloud, nil @@ -79,7 +79,7 @@ func AzureChina() *Cloud { } } -func namedCloud(name string) (*Cloud, error) { +func parseCloudName(name string) (*Cloud, error) { if name == AzurePublicName || name == "" { return AzurePublic(), nil } else if name == AzureChinaCloudName {