Skip to content

Commit

Permalink
Merge pull request #168 from breml/chore-goimports
Browse files Browse the repository at this point in the history
Chore goimports
  • Loading branch information
maveonair authored Nov 22, 2024
2 parents ae4861a + 95abbeb commit 636d987
Show file tree
Hide file tree
Showing 39 changed files with 44 additions and 39 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ linters:
enable:
- godot
- gofmt
- goimports
- misspell
- whitespace
- gci
Expand All @@ -16,3 +17,6 @@ linters-settings:
sections:
- standard
- default
- prefix(github.com/lxc/terraform-provider-incus)
goimports:
local-prefixes: github.com/lxc/terraform-provider-incus
2 changes: 1 addition & 1 deletion internal/clustering/resource_cluster_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
4 changes: 3 additions & 1 deletion internal/clustering/resource_cluster_group_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package clustering
import (
"context"
"fmt"

"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
Expand All @@ -11,8 +12,9 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
"github.com/lxc/terraform-provider-incus/internal/errors"
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"
Expand Down
2 changes: 1 addition & 1 deletion internal/common/incus_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/mitchellh/go-homedir"

"github.com/lxc/terraform-provider-incus/internal/errors"
Expand Down
2 changes: 1 addition & 1 deletion internal/config/resource_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"
localtls "github.com/lxc/incus/v6/shared/tls"

Expand Down
2 changes: 1 addition & 1 deletion internal/image/datasource_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/errors"
provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/image/resource_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/errors"
Expand Down
2 changes: 1 addition & 1 deletion internal/image/resource_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
1 change: 0 additions & 1 deletion internal/image/schema_validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"

"github.com/lxc/incus/v6/shared/osarch"
)

Expand Down
5 changes: 2 additions & 3 deletions internal/instance/resource_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
"github.com/lxc/terraform-provider-incus/internal/errors"
"github.com/lxc/terraform-provider-incus/internal/utils"

provider_config "github.com/lxc/terraform-provider-incus/internal/provider-config"
"github.com/lxc/terraform-provider-incus/internal/utils"
)

type InstanceModel struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/instance/resource_instance_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/errors"
Expand Down
2 changes: 1 addition & 1 deletion internal/instance/resource_instance_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/instance/resource_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"regexp"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
1 change: 1 addition & 0 deletions internal/instance/schema_validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package instance
import (
"context"
"fmt"

"github.com/hashicorp/terraform-plugin-framework/schema/validator"

"github.com/lxc/terraform-provider-incus/internal/utils"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_lb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/lxc/incus/v6/shared/api"

Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_zone_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_zone_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/network/resource_network_zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/profile/resource_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/profile/resource_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/project/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/project/resource_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider-config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"sync"

"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
incus_api "github.com/lxc/incus/v6/shared/api"
incus_config "github.com/lxc/incus/v6/shared/cliconfig"
incus_tls "github.com/lxc/incus/v6/shared/tls"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_bucket_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_bucket_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"

Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"

"github.com/lxc/terraform-provider-incus/internal/acctest"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/lxc/incus/v6/client"
incus "github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/shared/api"

"github.com/lxc/terraform-provider-incus/internal/common"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/resource_storage_volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dustinkirkland/golang-petname"
petname "github.com/dustinkirkland/golang-petname"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/plancheck"

Expand Down

0 comments on commit 636d987

Please sign in to comment.