Skip to content

Commit

Permalink
chore(imports): improve regexp (#1531)
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov authored Jan 12, 2024
1 parent 4178e00 commit 7a68bb5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fmt-test: $(TERRAFMT)
# It has to be added to PATH as `sed` command, to replace default BSD sed.
# See `brew info gnu-sed` for more details on how to add it to PATH.
fmt-imports:
find . -type f -name '*.go' -exec sed -zi 's/(?<== `\s+)"\n\+\t"/"\n"/g' {} +
find . -type f -name '*.go' -exec sed -zi 's/"[\r\n\t]\+"/"\n"/g' {} +
goimports -local "github.com/aiven/terraform-provider-aiven" -w .

#################################################
Expand Down
3 changes: 2 additions & 1 deletion internal/schemautil/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"time"

"github.com/aiven/aiven-go-client/v2"
"github.com/aiven/terraform-provider-aiven/internal/common"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/aiven/terraform-provider-aiven/internal/common"
)

// DatabaseDeleteWaiter is used to wait for Database to be deleted.
Expand Down
3 changes: 2 additions & 1 deletion internal/schemautil/service_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"log"

"github.com/aiven/aiven-go-client/v2"
"github.com/aiven/terraform-provider-aiven/internal/common"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"

"github.com/aiven/terraform-provider-aiven/internal/common"
)

func ResourceServiceUserCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
Expand Down
3 changes: 2 additions & 1 deletion internal/schemautil/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"time"

"github.com/aiven/aiven-go-client/v2"
"github.com/aiven/terraform-provider-aiven/internal/common"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/aiven/terraform-provider-aiven/internal/common"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package organization
import (
"context"

"github.com/aiven/aiven-go-client/v2"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/aiven/aiven-go-client/v2"

"github.com/aiven/terraform-provider-aiven/internal/schemautil"
"github.com/aiven/terraform-provider-aiven/internal/schemautil/userconfig"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/sdkprovider/service/organization/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"fmt"
"strings"

"github.com/aiven/aiven-go-client/v2"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/aiven/aiven-go-client/v2"
"github.com/aiven/terraform-provider-aiven/internal/common"
"github.com/aiven/terraform-provider-aiven/internal/sweep"
)
Expand Down

0 comments on commit 7a68bb5

Please sign in to comment.