Skip to content

Commit 48d47af

Browse files
committed
global: Re-organize imports
Signed-off-by: Stéphane Graber <[email protected]>
1 parent db07989 commit 48d47af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+86
-38
lines changed

internal/acctest/checks.go

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
99
"github.com/hashicorp/terraform-plugin-testing/terraform"
10+
1011
"github.com/lxc/terraform-provider-incus/internal/utils"
1112
)
1213

internal/acctest/provider_factory.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/hashicorp/terraform-plugin-framework/providerserver"
77
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
88
incus_config "github.com/lxc/incus/v6/shared/cliconfig"
9+
910
"github.com/lxc/terraform-provider-incus/internal/provider"
1011
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"
1112
)

internal/common/incus_file.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ import (
1111

1212
"github.com/hashicorp/terraform-plugin-framework/diag"
1313
"github.com/hashicorp/terraform-plugin-framework/types"
14-
incus "github.com/lxc/incus/v6/client"
15-
"github.com/lxc/terraform-provider-incus/internal/errors"
14+
"github.com/lxc/incus/v6/client"
1615
"github.com/mitchellh/go-homedir"
16+
17+
"github.com/lxc/terraform-provider-incus/internal/errors"
1718
)
1819

1920
type InstanceFileModel struct {

internal/common/incus_import.go

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"strings"
66

77
"github.com/hashicorp/terraform-plugin-framework/diag"
8+
89
"github.com/lxc/terraform-provider-incus/internal/utils"
910
)
1011

internal/image/resource_image.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ import (
2020
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
2121
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
2222
"github.com/hashicorp/terraform-plugin-framework/types"
23-
incus "github.com/lxc/incus/v6/client"
23+
"github.com/lxc/incus/v6/client"
2424
"github.com/lxc/incus/v6/shared/api"
25+
2526
"github.com/lxc/terraform-provider-incus/internal/errors"
2627
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"
2728
"github.com/lxc/terraform-provider-incus/internal/utils"

internal/image/resource_image_publish.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ import (
2323
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
2424
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
2525
"github.com/hashicorp/terraform-plugin-framework/types"
26-
incus "github.com/lxc/incus/v6/client"
26+
"github.com/lxc/incus/v6/client"
2727
"github.com/lxc/incus/v6/shared/api"
28+
2829
"github.com/lxc/terraform-provider-incus/internal/common"
2930
"github.com/lxc/terraform-provider-incus/internal/errors"
3031
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/image/resource_image_publish_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import (
55
"strings"
66
"testing"
77

8-
petname "github.com/dustinkirkland/golang-petname"
8+
"github.com/dustinkirkland/golang-petname"
99
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
10+
1011
"github.com/lxc/terraform-provider-incus/internal/acctest"
1112
)
1213

internal/image/resource_image_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import (
66
"strings"
77
"testing"
88

9-
petname "github.com/dustinkirkland/golang-petname"
9+
"github.com/dustinkirkland/golang-petname"
1010
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
11+
1112
"github.com/lxc/terraform-provider-incus/internal/acctest"
1213
)
1314

internal/instance/resource_instance.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ import (
2525
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
2626
"github.com/hashicorp/terraform-plugin-framework/types"
2727
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
28-
incus "github.com/lxc/incus/v6/client"
28+
"github.com/lxc/incus/v6/client"
2929
"github.com/lxc/incus/v6/shared/api"
30+
3031
"github.com/lxc/terraform-provider-incus/internal/common"
3132
"github.com/lxc/terraform-provider-incus/internal/errors"
3233
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/instance/resource_instance_file.go

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
1818
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1919
"github.com/hashicorp/terraform-plugin-framework/types"
20+
2021
"github.com/lxc/terraform-provider-incus/internal/common"
2122
"github.com/lxc/terraform-provider-incus/internal/errors"
2223
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/instance/resource_instance_file_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/instance/resource_instance_snapshot.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import (
1818
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1919
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
2020
"github.com/hashicorp/terraform-plugin-framework/types"
21-
incus "github.com/lxc/incus/v6/client"
21+
"github.com/lxc/incus/v6/client"
2222
"github.com/lxc/incus/v6/shared/api"
23+
2324
"github.com/lxc/terraform-provider-incus/internal/errors"
2425
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"
2526
)

internal/instance/resource_instance_snapshot_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/instance/resource_instance_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import (
55
"regexp"
66
"testing"
77

8-
petname "github.com/dustinkirkland/golang-petname"
8+
"github.com/dustinkirkland/golang-petname"
99
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
10+
1011
"github.com/lxc/terraform-provider-incus/internal/acctest"
1112
)
1213

internal/instance/schema_validators.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"strings"
77

88
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
9+
910
"github.com/lxc/terraform-provider-incus/internal/utils"
1011
)
1112

internal/network/resource_network.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import (
1616
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1717
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1818
"github.com/hashicorp/terraform-plugin-framework/types"
19-
incus "github.com/lxc/incus/v6/client"
19+
"github.com/lxc/incus/v6/client"
2020
"github.com/lxc/incus/v6/shared/api"
21+
2122
"github.com/lxc/terraform-provider-incus/internal/common"
2223
"github.com/lxc/terraform-provider-incus/internal/errors"
2324
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/network/resource_network_acl.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package network
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
78
"github.com/hashicorp/terraform-plugin-framework/attr"
89
"github.com/hashicorp/terraform-plugin-framework/diag"
@@ -17,8 +18,9 @@ import (
1718
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1819
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1920
"github.com/hashicorp/terraform-plugin-framework/types"
20-
incus "github.com/lxc/incus/v6/client"
21+
"github.com/lxc/incus/v6/client"
2122
"github.com/lxc/incus/v6/shared/api"
23+
2224
"github.com/lxc/terraform-provider-incus/internal/common"
2325
"github.com/lxc/terraform-provider-incus/internal/errors"
2426
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/network/resource_network_acl_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/network/resource_network_lb.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import (
1616
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1717
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1818
"github.com/hashicorp/terraform-plugin-framework/types"
19-
incus "github.com/lxc/incus/v6/client"
19+
"github.com/lxc/incus/v6/client"
2020
"github.com/lxc/incus/v6/shared/api"
21+
2122
"github.com/lxc/terraform-provider-incus/internal/common"
2223
"github.com/lxc/terraform-provider-incus/internal/errors"
2324
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/network/resource_network_lb_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import (
55
"strings"
66
"testing"
77

8-
petname "github.com/dustinkirkland/golang-petname"
8+
"github.com/dustinkirkland/golang-petname"
99
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1010
"github.com/lxc/incus/v6/shared/api"
11+
1112
"github.com/lxc/terraform-provider-incus/internal/acctest"
1213
)
1314

internal/network/resource_network_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/network/resource_network_zone.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ import (
1515
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1616
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1717
"github.com/hashicorp/terraform-plugin-framework/types"
18-
incus "github.com/lxc/incus/v6/client"
18+
"github.com/lxc/incus/v6/client"
1919
"github.com/lxc/incus/v6/shared/api"
20+
2021
"github.com/lxc/terraform-provider-incus/internal/common"
2122
"github.com/lxc/terraform-provider-incus/internal/errors"
2223
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/network/resource_network_zone_record.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ import (
1717
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1818
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1919
"github.com/hashicorp/terraform-plugin-framework/types"
20-
incus "github.com/lxc/incus/v6/client"
20+
"github.com/lxc/incus/v6/client"
2121
"github.com/lxc/incus/v6/shared/api"
22+
2223
"github.com/lxc/terraform-provider-incus/internal/common"
2324
"github.com/lxc/terraform-provider-incus/internal/errors"
2425
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/network/resource_network_zone_record_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/network/resource_network_zone_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/profile/datasource_profile.go

+2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package profile
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/hashicorp/terraform-plugin-framework/datasource"
78
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
89
"github.com/hashicorp/terraform-plugin-framework/types"
10+
911
"github.com/lxc/terraform-provider-incus/internal/common"
1012
"github.com/lxc/terraform-provider-incus/internal/errors"
1113
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/profile/resource_profile.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import (
1818
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1919
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
2020
"github.com/hashicorp/terraform-plugin-framework/types"
21-
incus "github.com/lxc/incus/v6/client"
21+
"github.com/lxc/incus/v6/client"
2222
"github.com/lxc/incus/v6/shared/api"
23+
2324
"github.com/lxc/terraform-provider-incus/internal/common"
2425
"github.com/lxc/terraform-provider-incus/internal/errors"
2526
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/profile/resource_profile_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/project/resource_project.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ import (
1515
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
1616
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1717
"github.com/hashicorp/terraform-plugin-framework/types"
18-
incus "github.com/lxc/incus/v6/client"
18+
"github.com/lxc/incus/v6/client"
1919
"github.com/lxc/incus/v6/shared/api"
20+
2021
"github.com/lxc/terraform-provider-incus/internal/common"
2122
"github.com/lxc/terraform-provider-incus/internal/errors"
2223
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/project/resource_project_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
petname "github.com/dustinkirkland/golang-petname"
7+
"github.com/dustinkirkland/golang-petname"
88
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
910
"github.com/lxc/terraform-provider-incus/internal/acctest"
1011
)
1112

internal/provider-config/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import (
77
"path/filepath"
88
"sync"
99

10-
incus "github.com/lxc/incus/v6/client"
10+
"github.com/lxc/incus/v6/client"
1111
incus_api "github.com/lxc/incus/v6/shared/api"
1212
incus_config "github.com/lxc/incus/v6/shared/cliconfig"
1313
incus_tls "github.com/lxc/incus/v6/shared/tls"
1414
incus_shared "github.com/lxc/incus/v6/shared/util"
15+
1516
"github.com/lxc/terraform-provider-incus/internal/utils"
1617
)
1718

internal/provider/provider.go

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/hashicorp/terraform-plugin-framework/types"
1616
incus_config "github.com/lxc/incus/v6/shared/cliconfig"
1717
incus_shared "github.com/lxc/incus/v6/shared/util"
18+
1819
"github.com/lxc/terraform-provider-incus/internal/image"
1920
"github.com/lxc/terraform-provider-incus/internal/instance"
2021
"github.com/lxc/terraform-provider-incus/internal/network"

internal/storage/resource_storage_bucket.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ import (
1717
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1818
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1919
"github.com/hashicorp/terraform-plugin-framework/types"
20-
incus "github.com/lxc/incus/v6/client"
20+
"github.com/lxc/incus/v6/client"
2121
"github.com/lxc/incus/v6/shared/api"
22+
2223
"github.com/lxc/terraform-provider-incus/internal/common"
2324
"github.com/lxc/terraform-provider-incus/internal/errors"
2425
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/storage/resource_storage_bucket_key.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package storage
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
78
"github.com/hashicorp/terraform-plugin-framework/diag"
89
"github.com/hashicorp/terraform-plugin-framework/path"
@@ -14,8 +15,9 @@ import (
1415
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1516
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1617
"github.com/hashicorp/terraform-plugin-framework/types"
17-
incus "github.com/lxc/incus/v6/client"
18+
"github.com/lxc/incus/v6/client"
1819
"github.com/lxc/incus/v6/shared/api"
20+
1921
"github.com/lxc/terraform-provider-incus/internal/common"
2022
"github.com/lxc/terraform-provider-incus/internal/errors"
2123
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"

internal/storage/resource_storage_bucket_key_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ package storage_test
22

33
import (
44
"fmt"
5-
petname "github.com/dustinkirkland/golang-petname"
5+
"testing"
6+
7+
"github.com/dustinkirkland/golang-petname"
68
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
79
"github.com/hashicorp/terraform-plugin-testing/terraform"
10+
811
"github.com/lxc/terraform-provider-incus/internal/acctest"
9-
"testing"
1012
)
1113

1214
func TestAccStorageBucketKey_basic(t *testing.T) {

0 commit comments

Comments
 (0)