Skip to content

Commit

Permalink
Fixed Lint Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
theonlyames committed Oct 23, 2024
1 parent 655ebbc commit 11c8d4d
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/sql/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/utils"
)

type MsSqlManagedDatabaseDataSourceModel struct {
Expand Down Expand Up @@ -144,30 +144,30 @@ func (d MsSqlManagedDatabaseDataSource) Read() sdk.ResourceFunc {
return err
}

id := commonids.NewSqlManagedInstanceDatabaseID(subscriptionId, managedInstanceId.ResourceGroup, managedInstanceId.Name, state.Name)
resp, err := client.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName)
id := commonids.NewSqlManagedInstanceDatabaseID(subscriptionId, managedInstanceId.ResourceGroupName, managedInstanceId.ManagedInstanceName, state.Name)
resp, err := client.Get(ctx, id.ResourceGroupName, id.ManagedInstanceName, id.DatabaseName)

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / test

too many arguments in call to client.Get

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

too many arguments in call to client.Get

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

too many arguments in call to client.Get

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

too many arguments in call to client.Get

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

too many arguments in call to client.Get

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / document-lint

too many arguments in call to client.Get

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / detect

too many arguments in call to client.Get

Check failure on line 148 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / compatibility-32bit-test

too many arguments in call to client.Get
if err != nil {
if response.WasNotFound(resp.HttpResponse) {
if response.WasNotFound(resp.Response.Response) {

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / test

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / document-lint

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / detect

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)

Check failure on line 150 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / compatibility-32bit-test

resp.Response undefined (type manageddatabases.GetOperationResponse has no field or method Response)
return fmt.Errorf("%s was not found", id)
}
return fmt.Errorf("retrieving %s: %v", id, err)
}

model := MsSqlManagedDatabaseDataSourceModel{
Name: id.DatabaseName,
ManagedInstanceName: managedInstanceId.Name,
ResourceGroupName: id.ResourceGroup,
ManagedInstanceName: managedInstanceId.ManagedInstanceName,
ResourceGroupName: id.ResourceGroupName,
ManagedInstanceId: managedInstanceId.ID(),
}

ltrResp, err := longTermRetentionClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName)
ltrResp, err := longTermRetentionClient.Get(ctx, id.ResourceGroupName, id.ManagedInstanceName, id.DatabaseName)

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / test

too many arguments in call to longTermRetentionClient.Get

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

too many arguments in call to longTermRetentionClient.Get

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

too many arguments in call to longTermRetentionClient.Get

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

too many arguments in call to longTermRetentionClient.Get

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

too many arguments in call to longTermRetentionClient.Get

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / document-lint

too many arguments in call to longTermRetentionClient.Get

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / detect

too many arguments in call to longTermRetentionClient.Get

Check failure on line 163 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / compatibility-32bit-test

too many arguments in call to longTermRetentionClient.Get
if err != nil {
return fmt.Errorf("retrieving Long Term Retention Policy for %s: %v", id, err)
}

model.LongTermRetentionPolicy = flattenLongTermRetentionPolicy(ltrResp)

Check failure on line 168 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / test

cannot use ltrResp (variable of type managedinstancelongtermretentionpolicies.GetOperationResponse) as managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties value in argument to flattenLongTermRetentionPolicy

Check failure on line 168 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

cannot use ltrResp (variable of type managedinstancelongtermretentionpolicies.GetOperationResponse) as managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties value in argument to flattenLongTermRetentionPolicy

Check failure on line 168 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

cannot use ltrResp (variable of type managedinstancelongtermretentionpolicies.GetOperationResponse) as managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties value in argument to flattenLongTermRetentionPolicy

Check failure on line 168 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

cannot use ltrResp (variable of type managedinstancelongtermretentionpolicies.GetOperationResponse) as managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties value in argument to flattenLongTermRetentionPolicy

Check failure on line 168 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / document-lint

cannot use ltrResp (variable of type managedinstancelongtermretentionpolicies.GetOperationResponse) as managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties value in argument to flattenLongTermRetentionPolicy

Check failure on line 168 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / detect

cannot use ltrResp (variable of type managedinstancelongtermretentionpolicies.GetOperationResponse) as managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties value in argument to flattenLongTermRetentionPolicy

Check failure on line 168 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / compatibility-32bit-test

cannot use ltrResp (variable of type managedinstancelongtermretentionpolicies.GetOperationResponse) as managedinstancelongtermretentionpolicies.ManagedInstanceLongTermRetentionPolicyProperties value in argument to flattenLongTermRetentionPolicy

shortTermRetentionResp, err := shortTermRetentionClient.Get(ctx, id.ResourceGroup, id.ManagedInstanceName, id.DatabaseName)
shortTermRetentionResp, err := shortTermRetentionClient.Get(ctx, id.ResourceGroupName, id.ManagedInstanceName, id.DatabaseName)

Check failure on line 170 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / test

too many arguments in call to shortTermRetentionClient.Get

Check failure on line 170 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / tflint

too many arguments in call to shortTermRetentionClient.Get

Check failure on line 170 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / golint

too many arguments in call to shortTermRetentionClient.Get

Check failure on line 170 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / document-lint

too many arguments in call to shortTermRetentionClient.Get

Check failure on line 170 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / detect

too many arguments in call to shortTermRetentionClient.Get

Check failure on line 170 in internal/services/mssqlmanagedinstance/mssql_managed_database_data_source.go

View workflow job for this annotation

GitHub Actions / compatibility-32bit-test

too many arguments in call to shortTermRetentionClient.Get
if err != nil {
return fmt.Errorf("retrieving Short Term Retention Policy for %s: %v", id, err)
}
Expand Down

0 comments on commit 11c8d4d

Please sign in to comment.