diff --git a/.golangci.yml b/.golangci.yml index ce600a0b0e..c1b495581a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,6 +16,7 @@ linters: - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false] - durationcheck # check for two durations multiplied together [fast: false, auto-fix: false] - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false] + - gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false] - goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false] - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true] - gofumpt # Gofumpt checks whether code was gofumpt-ed. [fast: true, auto-fix: true] @@ -25,9 +26,11 @@ linters: - gosec #(gas): Inspects source code for security problems [fast: false, auto-fix: false] - gosimple #(megacheck): Linter for Go source code that specializes in simplifying a code [fast: false, auto-fix: false] - govet #(vet, vetshadow): Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false] + - grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false] - importas # Enforces consistent import aliases [fast: false, auto-fix: false] - ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false] - intrange # intrange is a linter to find places where for loops could make use of an integer range. [fast: true, auto-fix: false] + - loggercheck # (logrlint): Checks key value pairs for common logger libraries (kitlog,klog,logr,zap). [fast: false, auto-fix: false] - misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true] - nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false] - nolintlint # Reports ill-formed or insufficient nolint directives [fast: true, auto-fix: false] @@ -35,6 +38,7 @@ linters: - predeclared # find code that shadows one of Go's predeclared identifiers [fast: true, auto-fix: false] - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. [fast: false, auto-fix: false] - rowserrcheck # checks whether Err of rows is checked successfully [fast: false, auto-fix: false] + - sloglint # ensure consistent code style when using log/slog [fast: false, auto-fix: false] - staticcheck - stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false] - tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17 [fast: false, auto-fix: false] diff --git a/internal/alias/config_test.go b/internal/alias/config_test.go index 08b85ca53d..4209e2085b 100644 --- a/internal/alias/config_test.go +++ b/internal/alias/config_test.go @@ -4,9 +4,8 @@ import ( "fmt" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/alias" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/alias" ) func TestConfig_ResolveAliases(t *testing.T) { diff --git a/internal/args/args_test.go b/internal/args/args_test.go index 82589a0c41..aa695e798a 100644 --- a/internal/args/args_test.go +++ b/internal/args/args_test.go @@ -7,9 +7,8 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/args" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/args" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/require" ) diff --git a/internal/args/marshal_test.go b/internal/args/marshal_test.go index 5dd4851aaf..51dd606551 100644 --- a/internal/args/marshal_test.go +++ b/internal/args/marshal_test.go @@ -4,12 +4,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/scaleway/scaleway-cli/v2/internal/args" - "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestMarshal(t *testing.T) { diff --git a/internal/args/unmarshal_test.go b/internal/args/unmarshal_test.go index 62f4bc68ac..896099cb93 100644 --- a/internal/args/unmarshal_test.go +++ b/internal/args/unmarshal_test.go @@ -6,12 +6,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/scaleway/scaleway-cli/v2/internal/args" - "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func init() { diff --git a/internal/config/config.go b/internal/config/config.go index 9ebb0bcb28..5b4200c9cf 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,10 +8,9 @@ import ( "runtime" "text/template" - "gopkg.in/yaml.v3" - "github.com/scaleway/scaleway-cli/v2/internal/alias" "github.com/scaleway/scaleway-sdk-go/scw" + "gopkg.in/yaml.v3" ) const ( diff --git a/internal/core/alias_test.go b/internal/core/alias_test.go index 3ab889b21f..2d85e24f56 100644 --- a/internal/core/alias_test.go +++ b/internal/core/alias_test.go @@ -3,10 +3,9 @@ package core_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/alias" + "github.com/scaleway/scaleway-cli/v2/internal/core" ) func TestCommandMatchAlias(t *testing.T) { diff --git a/internal/core/arg_specs_test.go b/internal/core/arg_specs_test.go index 36cae0ce1b..584b8f9e3d 100644 --- a/internal/core/arg_specs_test.go +++ b/internal/core/arg_specs_test.go @@ -3,9 +3,8 @@ package core_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/core" ) func TestOneOf(t *testing.T) { diff --git a/internal/core/autocomplete_test.go b/internal/core/autocomplete_test.go index 365355d016..74038ebc6f 100644 --- a/internal/core/autocomplete_test.go +++ b/internal/core/autocomplete_test.go @@ -8,7 +8,6 @@ import ( "testing" "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/scaleway/scaleway-cli/v2/internal/platform/terminal" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/assert" diff --git a/internal/core/bootstrap_test.go b/internal/core/bootstrap_test.go index 630992fd5d..fcd6b09bd8 100644 --- a/internal/core/bootstrap_test.go +++ b/internal/core/bootstrap_test.go @@ -5,10 +5,9 @@ import ( "reflect" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/args" + "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/interactive" ) diff --git a/internal/core/build_info_test.go b/internal/core/build_info_test.go index 6f47f44b0a..a2ff7024d7 100644 --- a/internal/core/build_info_test.go +++ b/internal/core/build_info_test.go @@ -7,11 +7,10 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" "github.com/hashicorp/go-version" "github.com/scaleway/scaleway-cli/v2/internal/args" + "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/require" ) diff --git a/internal/core/checks_test.go b/internal/core/checks_test.go index 88cef6c1ff..3aaecf6066 100644 --- a/internal/core/checks_test.go +++ b/internal/core/checks_test.go @@ -9,9 +9,8 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/core" iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/core/cobra_usage_builder_test.go b/internal/core/cobra_usage_builder_test.go index 360a4e21b1..b5787dc774 100644 --- a/internal/core/cobra_usage_builder_test.go +++ b/internal/core/cobra_usage_builder_test.go @@ -5,9 +5,8 @@ import ( "reflect" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/core" ) type ServerColor string diff --git a/internal/core/cobra_utils_test.go b/internal/core/cobra_utils_test.go index 9d3dbcecf4..3ec28e8e7a 100644 --- a/internal/core/cobra_utils_test.go +++ b/internal/core/cobra_utils_test.go @@ -7,10 +7,9 @@ import ( "testing" "time" + "github.com/scaleway/scaleway-cli/v2/internal/args" "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/stretchr/testify/assert" - - "github.com/scaleway/scaleway-cli/v2/internal/args" ) type testType struct { diff --git a/internal/core/command_interceptor_test.go b/internal/core/command_interceptor_test.go index 2f5cc77e7d..0fb1aad089 100644 --- a/internal/core/command_interceptor_test.go +++ b/internal/core/command_interceptor_test.go @@ -4,9 +4,8 @@ import ( "context" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/core" ) func Test_CombineCommandInterceptor(t *testing.T) { diff --git a/internal/core/default_test.go b/internal/core/default_test.go index a682aef99d..76886f9bcd 100644 --- a/internal/core/default_test.go +++ b/internal/core/default_test.go @@ -4,10 +4,9 @@ import ( "context" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/args" + "github.com/scaleway/scaleway-cli/v2/internal/core" ) func Test_ApplyDefaultValues(t *testing.T) { diff --git a/internal/core/printer.go b/internal/core/printer.go index 7d2993fb08..09c3255031 100644 --- a/internal/core/printer.go +++ b/internal/core/printer.go @@ -8,10 +8,9 @@ import ( "strings" "text/template" - "gopkg.in/yaml.v3" - "github.com/scaleway/scaleway-cli/v2/internal/gofields" "github.com/scaleway/scaleway-cli/v2/internal/human" + "gopkg.in/yaml.v3" ) // Type defines an formatter format. diff --git a/internal/core/result.go b/internal/core/result.go index fbf5272fe7..4d5fc79b60 100644 --- a/internal/core/result.go +++ b/internal/core/result.go @@ -5,10 +5,9 @@ import ( "fmt" "strings" + "github.com/fatih/color" "github.com/scaleway/scaleway-cli/v2/internal/human" "github.com/scaleway/scaleway-cli/v2/internal/interactive" - - "github.com/fatih/color" "github.com/scaleway/scaleway-cli/v2/internal/terminal" "github.com/scaleway/scaleway-sdk-go/strcase" ) diff --git a/internal/core/result_test.go b/internal/core/result_test.go index 0ed0ae218b..4108ff8430 100644 --- a/internal/core/result_test.go +++ b/internal/core/result_test.go @@ -3,11 +3,9 @@ package core_test import ( "testing" - "github.com/stretchr/testify/require" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestResult(t *testing.T) { diff --git a/internal/core/shell_test.go b/internal/core/shell_test.go index 69ef906e9d..c074c8a0c3 100644 --- a/internal/core/shell_test.go +++ b/internal/core/shell_test.go @@ -3,9 +3,8 @@ package core_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/core" ) func TestShell_OptionToArgSpecName(t *testing.T) { diff --git a/internal/core/testing_test.go b/internal/core/testing_test.go index 7138ebbc37..4a6502801f 100644 --- a/internal/core/testing_test.go +++ b/internal/core/testing_test.go @@ -4,9 +4,8 @@ import ( "regexp" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/core" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/core" ) func TestGoldenIgnoreLines(t *testing.T) { diff --git a/internal/editor/editor_test.go b/internal/editor/editor_test.go index 120d8fcf0e..742d2b8eb2 100644 --- a/internal/editor/editor_test.go +++ b/internal/editor/editor_test.go @@ -3,9 +3,8 @@ package editor_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/editor" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/editor" ) func Test_updateResourceEditor(t *testing.T) { diff --git a/internal/editor/request_test.go b/internal/editor/request_test.go index 8e01f25aa2..66cd7391dc 100644 --- a/internal/editor/request_test.go +++ b/internal/editor/request_test.go @@ -4,9 +4,8 @@ import ( "reflect" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/editor" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/editor" ) func Test_createGetResourceRequest(t *testing.T) { diff --git a/internal/gofields/gofields_test.go b/internal/gofields/gofields_test.go index a45e5d4300..0e004a6435 100644 --- a/internal/gofields/gofields_test.go +++ b/internal/gofields/gofields_test.go @@ -5,9 +5,8 @@ import ( "strings" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/gofields" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/gofields" ) type Friends struct { diff --git a/internal/human/marshal.go b/internal/human/marshal.go index 9bcd26e1d7..7de91733b5 100644 --- a/internal/human/marshal.go +++ b/internal/human/marshal.go @@ -8,15 +8,14 @@ import ( "strconv" "strings" - "golang.org/x/text/cases" - "golang.org/x/text/language" - "github.com/fatih/color" "github.com/scaleway/scaleway-cli/v2/internal/gofields" "github.com/scaleway/scaleway-cli/v2/internal/tabwriter" "github.com/scaleway/scaleway-cli/v2/internal/terminal" "github.com/scaleway/scaleway-sdk-go/logger" "github.com/scaleway/scaleway-sdk-go/strcase" + "golang.org/x/text/cases" + "golang.org/x/text/language" ) // Padding between column diff --git a/internal/human/marshal_test.go b/internal/human/marshal_test.go index d1d4cba01b..9543349cda 100644 --- a/internal/human/marshal_test.go +++ b/internal/human/marshal_test.go @@ -6,10 +6,9 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/human" - "github.com/alecthomas/assert" "github.com/dustin/go-humanize" + "github.com/scaleway/scaleway-cli/v2/internal/human" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/interactive/print_test.go b/internal/interactive/print_test.go index d84cc66777..70e2c51524 100644 --- a/internal/interactive/print_test.go +++ b/internal/interactive/print_test.go @@ -6,9 +6,8 @@ import ( "bytes" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/interactive" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/interactive" ) func TestPrint(t *testing.T) { diff --git a/internal/interactive/prompt_test.go b/internal/interactive/prompt_test.go index e6e55baccf..297991d1e0 100644 --- a/internal/interactive/prompt_test.go +++ b/internal/interactive/prompt_test.go @@ -5,9 +5,8 @@ import ( "context" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/interactive" - "github.com/alecthomas/assert" + "github.com/scaleway/scaleway-cli/v2/internal/interactive" "github.com/stretchr/testify/require" ) diff --git a/internal/namespaces/applesilicon/v1alpha1/custom_server_ssh_test.go b/internal/namespaces/applesilicon/v1alpha1/custom_server_ssh_test.go index 518d5c38c9..a358fde46d 100644 --- a/internal/namespaces/applesilicon/v1alpha1/custom_server_ssh_test.go +++ b/internal/namespaces/applesilicon/v1alpha1/custom_server_ssh_test.go @@ -3,9 +3,8 @@ package applesilicon_test import ( "testing" - applesilicon "github.com/scaleway/scaleway-cli/v2/internal/namespaces/applesilicon/v1alpha1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + applesilicon "github.com/scaleway/scaleway-cli/v2/internal/namespaces/applesilicon/v1alpha1" ) func Test_ServerSSH(t *testing.T) { diff --git a/internal/namespaces/applesilicon/v1alpha1/custom_server_types_test.go b/internal/namespaces/applesilicon/v1alpha1/custom_server_types_test.go index 68e79ca0b6..f06abe44fb 100644 --- a/internal/namespaces/applesilicon/v1alpha1/custom_server_types_test.go +++ b/internal/namespaces/applesilicon/v1alpha1/custom_server_types_test.go @@ -3,9 +3,8 @@ package applesilicon_test import ( "testing" - applesilicon "github.com/scaleway/scaleway-cli/v2/internal/namespaces/applesilicon/v1alpha1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + applesilicon "github.com/scaleway/scaleway-cli/v2/internal/namespaces/applesilicon/v1alpha1" ) func Test_ServerTypeList(t *testing.T) { diff --git a/internal/namespaces/autocomplete/autocomplete_test.go b/internal/namespaces/autocomplete/autocomplete_test.go index 1762138b55..1f9605178c 100644 --- a/internal/namespaces/autocomplete/autocomplete_test.go +++ b/internal/namespaces/autocomplete/autocomplete_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/autocomplete" - "github.com/stretchr/testify/assert" ) diff --git a/internal/namespaces/baremetal/v1/custom_offer_test.go b/internal/namespaces/baremetal/v1/custom_offer_test.go index be332eba38..f233edc931 100644 --- a/internal/namespaces/baremetal/v1/custom_offer_test.go +++ b/internal/namespaces/baremetal/v1/custom_offer_test.go @@ -3,9 +3,8 @@ package baremetal_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1" ) func Test_baremetalGetOffer(t *testing.T) { diff --git a/internal/namespaces/baremetal/v1/custom_server_install_test.go b/internal/namespaces/baremetal/v1/custom_server_install_test.go index adf605684c..d48792278e 100644 --- a/internal/namespaces/baremetal/v1/custom_server_install_test.go +++ b/internal/namespaces/baremetal/v1/custom_server_install_test.go @@ -3,9 +3,8 @@ package baremetal_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1" iam "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iam/v1alpha1" ) diff --git a/internal/namespaces/baremetal/v1/custom_server_test.go b/internal/namespaces/baremetal/v1/custom_server_test.go index 1a3d33b735..784e0d7050 100644 --- a/internal/namespaces/baremetal/v1/custom_server_test.go +++ b/internal/namespaces/baremetal/v1/custom_server_test.go @@ -3,9 +3,8 @@ package baremetal_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1" baremetalSDK "github.com/scaleway/scaleway-sdk-go/api/baremetal/v1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/config/commands.go b/internal/namespaces/config/commands.go index a035daa0c3..af4a40e496 100644 --- a/internal/namespaces/config/commands.go +++ b/internal/namespaces/config/commands.go @@ -8,8 +8,6 @@ import ( "reflect" "strings" - "github.com/scaleway/scaleway-sdk-go/validation" - "github.com/fatih/color" "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/interactive" @@ -17,6 +15,7 @@ import ( "github.com/scaleway/scaleway-cli/v2/internal/terminal" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/scaleway/scaleway-sdk-go/strcase" + "github.com/scaleway/scaleway-sdk-go/validation" ) func GetCommands() *core.Commands { diff --git a/internal/namespaces/config/commands_test.go b/internal/namespaces/config/commands_test.go index 38f4a53b7e..dda21d9d3b 100644 --- a/internal/namespaces/config/commands_test.go +++ b/internal/namespaces/config/commands_test.go @@ -7,10 +7,9 @@ import ( "regexp" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/config" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/config" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/require" ) diff --git a/internal/namespaces/container/v1beta1/custom_container_test.go b/internal/namespaces/container/v1beta1/custom_container_test.go index 0847f8e59a..4fe64586c7 100644 --- a/internal/namespaces/container/v1beta1/custom_container_test.go +++ b/internal/namespaces/container/v1beta1/custom_container_test.go @@ -4,10 +4,9 @@ import ( "fmt" "testing" - container "github.com/scaleway/scaleway-cli/v2/internal/namespaces/container/v1beta1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + container "github.com/scaleway/scaleway-cli/v2/internal/namespaces/container/v1beta1" containerSDK "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1" ) diff --git a/internal/namespaces/feedback/custom_test.go b/internal/namespaces/feedback/custom_test.go index c704e32987..da44da1840 100644 --- a/internal/namespaces/feedback/custom_test.go +++ b/internal/namespaces/feedback/custom_test.go @@ -5,10 +5,9 @@ import ( "runtime" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/feedback" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/feedback" ) func Test_FeedbackBug(t *testing.T) { diff --git a/internal/namespaces/flexibleip/v1alpha1/custom_ip_test.go b/internal/namespaces/flexibleip/v1alpha1/custom_ip_test.go index 390f1735bc..357b866ca9 100644 --- a/internal/namespaces/flexibleip/v1alpha1/custom_ip_test.go +++ b/internal/namespaces/flexibleip/v1alpha1/custom_ip_test.go @@ -3,10 +3,9 @@ package flexibleip_test import ( "testing" - flexibleip "github.com/scaleway/scaleway-cli/v2/internal/namespaces/flexibleip/v1alpha1" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1" + flexibleip "github.com/scaleway/scaleway-cli/v2/internal/namespaces/flexibleip/v1alpha1" ) func Test_CreateFlexibleWait(t *testing.T) { diff --git a/internal/namespaces/function/v1beta1/custom_deploy_test.go b/internal/namespaces/function/v1beta1/custom_deploy_test.go index f30e4e694f..ba3ae2e8cd 100644 --- a/internal/namespaces/function/v1beta1/custom_deploy_test.go +++ b/internal/namespaces/function/v1beta1/custom_deploy_test.go @@ -5,9 +5,8 @@ import ( "os" "testing" - function "github.com/scaleway/scaleway-cli/v2/internal/namespaces/function/v1beta1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + function "github.com/scaleway/scaleway-cli/v2/internal/namespaces/function/v1beta1" functionSDK "github.com/scaleway/scaleway-sdk-go/api/function/v1beta1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/iam/v1alpha1/custom_test.go b/internal/namespaces/iam/v1alpha1/custom_test.go index bb07196647..0e75cfa252 100644 --- a/internal/namespaces/iam/v1alpha1/custom_test.go +++ b/internal/namespaces/iam/v1alpha1/custom_test.go @@ -5,9 +5,8 @@ import ( "path" "testing" - iam "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iam/v1alpha1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + iam "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iam/v1alpha1" iamsdk "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" ) diff --git a/internal/namespaces/info/custom_test.go b/internal/namespaces/info/custom_test.go index dbab077414..ec5402eaf4 100644 --- a/internal/namespaces/info/custom_test.go +++ b/internal/namespaces/info/custom_test.go @@ -3,9 +3,8 @@ package info_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/info" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/info" ) func Test_Info(t *testing.T) { diff --git a/internal/namespaces/instance/v1/custom_image_test.go b/internal/namespaces/instance/v1/custom_image_test.go index 33f94c2425..374c5fab76 100644 --- a/internal/namespaces/instance/v1/custom_image_test.go +++ b/internal/namespaces/instance/v1/custom_image_test.go @@ -3,10 +3,9 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/instance/v1/custom_ip_test.go b/internal/namespaces/instance/v1/custom_ip_test.go index 085d483b08..4b2e28e9bd 100644 --- a/internal/namespaces/instance/v1/custom_ip_test.go +++ b/internal/namespaces/instance/v1/custom_ip_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_IPAttach(t *testing.T) { diff --git a/internal/namespaces/instance/v1/custom_placement_group_test.go b/internal/namespaces/instance/v1/custom_placement_group_test.go index 631018964b..9c4da4c90a 100644 --- a/internal/namespaces/instance/v1/custom_placement_group_test.go +++ b/internal/namespaces/instance/v1/custom_placement_group_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_GetPlacementGroup(t *testing.T) { diff --git a/internal/namespaces/instance/v1/custom_privatenics_test.go b/internal/namespaces/instance/v1/custom_privatenics_test.go index b840651523..97ea990036 100644 --- a/internal/namespaces/instance/v1/custom_privatenics_test.go +++ b/internal/namespaces/instance/v1/custom_privatenics_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" ) diff --git a/internal/namespaces/instance/v1/custom_security_group_test.go b/internal/namespaces/instance/v1/custom_security_group_test.go index d811f04d51..3763ee2df9 100644 --- a/internal/namespaces/instance/v1/custom_security_group_test.go +++ b/internal/namespaces/instance/v1/custom_security_group_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_SecurityGroupGet(t *testing.T) { diff --git a/internal/namespaces/instance/v1/custom_server_action_test.go b/internal/namespaces/instance/v1/custom_server_action_test.go index 0209d9cb35..e13f4b18a4 100644 --- a/internal/namespaces/instance/v1/custom_server_action_test.go +++ b/internal/namespaces/instance/v1/custom_server_action_test.go @@ -3,11 +3,10 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/interactive" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/require" diff --git a/internal/namespaces/instance/v1/custom_server_create_test.go b/internal/namespaces/instance/v1/custom_server_create_test.go index 51fc8a8385..9a0ae09f8a 100644 --- a/internal/namespaces/instance/v1/custom_server_create_test.go +++ b/internal/namespaces/instance/v1/custom_server_create_test.go @@ -4,13 +4,11 @@ import ( "fmt" "testing" - block "github.com/scaleway/scaleway-cli/v2/internal/namespaces/block/v1alpha1" - instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" - - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + block "github.com/scaleway/scaleway-cli/v2/internal/namespaces/block/v1alpha1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" + instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/instance/v1/custom_server_rdp.go b/internal/namespaces/instance/v1/custom_server_rdp.go index 72afe57e17..407e48ce16 100644 --- a/internal/namespaces/instance/v1/custom_server_rdp.go +++ b/internal/namespaces/instance/v1/custom_server_rdp.go @@ -11,13 +11,12 @@ import ( "reflect" "strings" - iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" - "github.com/scaleway/scaleway-sdk-go/api/instance/v1" - "golang.org/x/crypto/ssh" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/interactive" + iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1" + "github.com/scaleway/scaleway-sdk-go/api/instance/v1" "github.com/scaleway/scaleway-sdk-go/scw" + "golang.org/x/crypto/ssh" ) type instanceServerGetRdpPasswordRequest struct { diff --git a/internal/namespaces/instance/v1/custom_server_ssh_test.go b/internal/namespaces/instance/v1/custom_server_ssh_test.go index 596c2ba260..8786c33c84 100644 --- a/internal/namespaces/instance/v1/custom_server_ssh_test.go +++ b/internal/namespaces/instance/v1/custom_server_ssh_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_ServerSSH(t *testing.T) { diff --git a/internal/namespaces/instance/v1/custom_server_test.go b/internal/namespaces/instance/v1/custom_server_test.go index 871fa3b3ad..e961e907e4 100644 --- a/internal/namespaces/instance/v1/custom_server_test.go +++ b/internal/namespaces/instance/v1/custom_server_test.go @@ -3,12 +3,11 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/interactive" blockCli "github.com/scaleway/scaleway-cli/v2/internal/namespaces/block/v1alpha1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" block "github.com/scaleway/scaleway-sdk-go/api/block/v1alpha1" instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" "github.com/scaleway/scaleway-sdk-go/scw" diff --git a/internal/namespaces/instance/v1/custom_server_type_test.go b/internal/namespaces/instance/v1/custom_server_type_test.go index e170ec12d7..6d6f9796de 100644 --- a/internal/namespaces/instance/v1/custom_server_type_test.go +++ b/internal/namespaces/instance/v1/custom_server_type_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_ServerTypeList(t *testing.T) { diff --git a/internal/namespaces/instance/v1/custom_snapshot_test.go b/internal/namespaces/instance/v1/custom_snapshot_test.go index a3cbbe3a75..454566c9d2 100644 --- a/internal/namespaces/instance/v1/custom_snapshot_test.go +++ b/internal/namespaces/instance/v1/custom_snapshot_test.go @@ -3,10 +3,9 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" ) diff --git a/internal/namespaces/instance/v1/custom_ssh_key_test.go b/internal/namespaces/instance/v1/custom_ssh_key_test.go index dd7a530425..412149a190 100644 --- a/internal/namespaces/instance/v1/custom_ssh_key_test.go +++ b/internal/namespaces/instance/v1/custom_ssh_key_test.go @@ -3,10 +3,9 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" ) diff --git a/internal/namespaces/instance/v1/custom_user_data_test.go b/internal/namespaces/instance/v1/custom_user_data_test.go index a61b289b6a..19dedd78a1 100644 --- a/internal/namespaces/instance/v1/custom_user_data_test.go +++ b/internal/namespaces/instance/v1/custom_user_data_test.go @@ -4,9 +4,8 @@ import ( "os" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_UserDataGet(t *testing.T) { diff --git a/internal/namespaces/instance/v1/custom_volume_type_test.go b/internal/namespaces/instance/v1/custom_volume_type_test.go index ac18e023cf..6855455f71 100644 --- a/internal/namespaces/instance/v1/custom_volume_type_test.go +++ b/internal/namespaces/instance/v1/custom_volume_type_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_VolumeTypeList(t *testing.T) { diff --git a/internal/namespaces/instance/v1/instance_cli_test.go b/internal/namespaces/instance/v1/instance_cli_test.go index 0b8c2415c1..ea462839bb 100644 --- a/internal/namespaces/instance/v1/instance_cli_test.go +++ b/internal/namespaces/instance/v1/instance_cli_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" instanceSDK "github.com/scaleway/scaleway-sdk-go/api/instance/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/namespaces/instance/v1/ip_test.go b/internal/namespaces/instance/v1/ip_test.go index 4216997172..11684ba22b 100644 --- a/internal/namespaces/instance/v1/ip_test.go +++ b/internal/namespaces/instance/v1/ip_test.go @@ -3,9 +3,8 @@ package instance_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" ) func Test_IpCreate(t *testing.T) { diff --git a/internal/namespaces/iot/v1/custom_device_test.go b/internal/namespaces/iot/v1/custom_device_test.go index a52e9f6b0d..ce8921095f 100644 --- a/internal/namespaces/iot/v1/custom_device_test.go +++ b/internal/namespaces/iot/v1/custom_device_test.go @@ -3,9 +3,8 @@ package iot_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iot/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iot/v1" ) func Test_CreateDevice(t *testing.T) { diff --git a/internal/namespaces/iot/v1/custom_network_test.go b/internal/namespaces/iot/v1/custom_network_test.go index cddfae9632..a0b0c6ab27 100644 --- a/internal/namespaces/iot/v1/custom_network_test.go +++ b/internal/namespaces/iot/v1/custom_network_test.go @@ -3,9 +3,8 @@ package iot_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iot/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iot/v1" ) func Test_CreateNetwork(t *testing.T) { diff --git a/internal/namespaces/k8s/v1/custom_cluster_test.go b/internal/namespaces/k8s/v1/custom_cluster_test.go index e5a823e1dc..adf67550af 100644 --- a/internal/namespaces/k8s/v1/custom_cluster_test.go +++ b/internal/namespaces/k8s/v1/custom_cluster_test.go @@ -3,9 +3,8 @@ package k8s_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" ) func Test_GetCluster(t *testing.T) { diff --git a/internal/namespaces/k8s/v1/custom_kubeconfig_get_test.go b/internal/namespaces/k8s/v1/custom_kubeconfig_get_test.go index f0820c739f..45ea5af2aa 100644 --- a/internal/namespaces/k8s/v1/custom_kubeconfig_get_test.go +++ b/internal/namespaces/k8s/v1/custom_kubeconfig_get_test.go @@ -3,12 +3,11 @@ package k8s_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" - "github.com/alecthomas/assert" "github.com/ghodss/yaml" api "github.com/kubernetes-client/go-base/config/api" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" ) func Test_GetKubeconfig(t *testing.T) { diff --git a/internal/namespaces/k8s/v1/custom_kubeconfig_install_test.go b/internal/namespaces/k8s/v1/custom_kubeconfig_install_test.go index ac2aeb8147..f80221e71c 100644 --- a/internal/namespaces/k8s/v1/custom_kubeconfig_install_test.go +++ b/internal/namespaces/k8s/v1/custom_kubeconfig_install_test.go @@ -5,12 +5,11 @@ import ( "path" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" - "github.com/alecthomas/assert" "github.com/ghodss/yaml" api "github.com/kubernetes-client/go-base/config/api" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" k8sSDK "github.com/scaleway/scaleway-sdk-go/api/k8s/v1" ) diff --git a/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall_test.go b/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall_test.go index dbf8ab7bd7..5ff948b5d9 100644 --- a/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall_test.go +++ b/internal/namespaces/k8s/v1/custom_kubeconfig_uninstall_test.go @@ -5,12 +5,11 @@ import ( "path" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" - "github.com/alecthomas/assert" "github.com/ghodss/yaml" api "github.com/kubernetes-client/go-base/config/api" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" k8sSDK "github.com/scaleway/scaleway-sdk-go/api/k8s/v1" ) diff --git a/internal/namespaces/k8s/v1/custom_version_test.go b/internal/namespaces/k8s/v1/custom_version_test.go index bae5ea44de..d0dd3a32dc 100644 --- a/internal/namespaces/k8s/v1/custom_version_test.go +++ b/internal/namespaces/k8s/v1/custom_version_test.go @@ -3,9 +3,8 @@ package k8s_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" ) func Test_GetVersion(t *testing.T) { diff --git a/internal/namespaces/lb/v1/custom_backend_test.go b/internal/namespaces/lb/v1/custom_backend_test.go index 61959bccba..6123af3c4e 100644 --- a/internal/namespaces/lb/v1/custom_backend_test.go +++ b/internal/namespaces/lb/v1/custom_backend_test.go @@ -3,10 +3,9 @@ package lb_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" ) func Test_GetBackend(t *testing.T) { diff --git a/internal/namespaces/lb/v1/custom_certificate_test.go b/internal/namespaces/lb/v1/custom_certificate_test.go index 40ba1cc7ef..7c7af78aac 100644 --- a/internal/namespaces/lb/v1/custom_certificate_test.go +++ b/internal/namespaces/lb/v1/custom_certificate_test.go @@ -3,9 +3,8 @@ package lb_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" ) func Test_CreateCertificate(t *testing.T) { diff --git a/internal/namespaces/lb/v1/custom_frontend_test.go b/internal/namespaces/lb/v1/custom_frontend_test.go index 75609c07bc..7e1a0f6f4d 100644 --- a/internal/namespaces/lb/v1/custom_frontend_test.go +++ b/internal/namespaces/lb/v1/custom_frontend_test.go @@ -3,10 +3,9 @@ package lb_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" ) func Test_GetFrontend(t *testing.T) { diff --git a/internal/namespaces/lb/v1/custom_lb_test.go b/internal/namespaces/lb/v1/custom_lb_test.go index 1db3f8d6d8..f93a5875d4 100644 --- a/internal/namespaces/lb/v1/custom_lb_test.go +++ b/internal/namespaces/lb/v1/custom_lb_test.go @@ -4,11 +4,10 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" ) func Test_ListLB(t *testing.T) { diff --git a/internal/namespaces/lb/v1/custom_private_network_test.go b/internal/namespaces/lb/v1/custom_private_network_test.go index eb0dd9a195..4732450ee7 100644 --- a/internal/namespaces/lb/v1/custom_private_network_test.go +++ b/internal/namespaces/lb/v1/custom_private_network_test.go @@ -4,9 +4,8 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" ) diff --git a/internal/namespaces/marketplace/v2/marketplace_cli_test.go b/internal/namespaces/marketplace/v2/marketplace_cli_test.go index 099ab20172..336f57d318 100644 --- a/internal/namespaces/marketplace/v2/marketplace_cli_test.go +++ b/internal/namespaces/marketplace/v2/marketplace_cli_test.go @@ -3,9 +3,8 @@ package marketplace_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/marketplace/v2" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/marketplace/v2" ) func Test_marketplaceImageList(t *testing.T) { diff --git a/internal/namespaces/mnq/v1beta1/custom_nats_test.go b/internal/namespaces/mnq/v1beta1/custom_nats_test.go index a5e4b23524..4d00a9edce 100644 --- a/internal/namespaces/mnq/v1beta1/custom_nats_test.go +++ b/internal/namespaces/mnq/v1beta1/custom_nats_test.go @@ -7,9 +7,8 @@ import ( "testing" "github.com/alecthomas/assert" - mnq "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mnq/v1beta1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + mnq "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mnq/v1beta1" ) func Test_CreateContext(t *testing.T) { diff --git a/internal/namespaces/object/v1/custom_config_get_test.go b/internal/namespaces/object/v1/custom_config_get_test.go index 8dcf340a7c..68274ade96 100644 --- a/internal/namespaces/object/v1/custom_config_get_test.go +++ b/internal/namespaces/object/v1/custom_config_get_test.go @@ -3,9 +3,8 @@ package object_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/require" ) diff --git a/internal/namespaces/object/v1/custom_config_install_test.go b/internal/namespaces/object/v1/custom_config_install_test.go index 4e07511e39..5060100ec4 100644 --- a/internal/namespaces/object/v1/custom_config_install_test.go +++ b/internal/namespaces/object/v1/custom_config_install_test.go @@ -4,9 +4,8 @@ import ( "path" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1" "github.com/scaleway/scaleway-sdk-go/scw" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/namespaces/rdb/v1/custom_backup_test.go b/internal/namespaces/rdb/v1/custom_backup_test.go index 5e5c3500e4..d1e624abb0 100644 --- a/internal/namespaces/rdb/v1/custom_backup_test.go +++ b/internal/namespaces/rdb/v1/custom_backup_test.go @@ -5,9 +5,8 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/rdb/v1/custom_endpoint_test.go b/internal/namespaces/rdb/v1/custom_endpoint_test.go index 7fd3d0515f..894d15851c 100644 --- a/internal/namespaces/rdb/v1/custom_endpoint_test.go +++ b/internal/namespaces/rdb/v1/custom_endpoint_test.go @@ -3,9 +3,8 @@ package rdb_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" "github.com/scaleway/scaleway-sdk-go/api/ipam/v1" rdbSDK "github.com/scaleway/scaleway-sdk-go/api/rdb/v1" diff --git a/internal/namespaces/rdb/v1/custom_engine_settings_test.go b/internal/namespaces/rdb/v1/custom_engine_settings_test.go index c18379b72d..6f976b4e07 100644 --- a/internal/namespaces/rdb/v1/custom_engine_settings_test.go +++ b/internal/namespaces/rdb/v1/custom_engine_settings_test.go @@ -3,9 +3,8 @@ package rdb_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" ) func Test_ListEngineSettings(t *testing.T) { diff --git a/internal/namespaces/rdb/v1/custom_engine_test.go b/internal/namespaces/rdb/v1/custom_engine_test.go index 19370314e6..1031518598 100644 --- a/internal/namespaces/rdb/v1/custom_engine_test.go +++ b/internal/namespaces/rdb/v1/custom_engine_test.go @@ -3,9 +3,8 @@ package rdb_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" ) func Test_EngineList(t *testing.T) { diff --git a/internal/namespaces/rdb/v1/custom_instance_test.go b/internal/namespaces/rdb/v1/custom_instance_test.go index 95aca7d8c9..c21585aaf9 100644 --- a/internal/namespaces/rdb/v1/custom_instance_test.go +++ b/internal/namespaces/rdb/v1/custom_instance_test.go @@ -5,10 +5,9 @@ import ( "strings" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" rdbSDK "github.com/scaleway/scaleway-sdk-go/api/rdb/v1" ) diff --git a/internal/namespaces/rdb/v1/custom_url_test.go b/internal/namespaces/rdb/v1/custom_url_test.go index 0aa1e64fc3..768f957592 100644 --- a/internal/namespaces/rdb/v1/custom_url_test.go +++ b/internal/namespaces/rdb/v1/custom_url_test.go @@ -4,9 +4,8 @@ import ( "fmt" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" "github.com/stretchr/testify/assert" ) diff --git a/internal/namespaces/rdb/v1/custom_user_test.go b/internal/namespaces/rdb/v1/custom_user_test.go index 08e82c2ec1..ff301850b0 100644 --- a/internal/namespaces/rdb/v1/custom_user_test.go +++ b/internal/namespaces/rdb/v1/custom_user_test.go @@ -4,9 +4,8 @@ import ( "fmt" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" ) func Test_ListUser(t *testing.T) { diff --git a/internal/namespaces/rdb/v1/helper_test.go b/internal/namespaces/rdb/v1/helper_test.go index 22e97c913a..2d6352aeff 100644 --- a/internal/namespaces/rdb/v1/helper_test.go +++ b/internal/namespaces/rdb/v1/helper_test.go @@ -3,9 +3,8 @@ package rdb_test import ( "fmt" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" "github.com/scaleway/scaleway-sdk-go/api/vpc/v1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/redis/v1/custom_cluster_test.go b/internal/namespaces/redis/v1/custom_cluster_test.go index 610138c346..82f5ba2b3b 100644 --- a/internal/namespaces/redis/v1/custom_cluster_test.go +++ b/internal/namespaces/redis/v1/custom_cluster_test.go @@ -6,10 +6,9 @@ import ( "testing" "time" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" redisSDK "github.com/scaleway/scaleway-sdk-go/api/redis/v1" ) diff --git a/internal/namespaces/registry/v1/custom_docker_helper_test.go b/internal/namespaces/registry/v1/custom_docker_helper_test.go index 8d2ecfc386..5de04f8c5e 100644 --- a/internal/namespaces/registry/v1/custom_docker_helper_test.go +++ b/internal/namespaces/registry/v1/custom_docker_helper_test.go @@ -7,10 +7,9 @@ import ( "runtime" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" "github.com/stretchr/testify/require" ) diff --git a/internal/namespaces/registry/v1/custom_image_test.go b/internal/namespaces/registry/v1/custom_image_test.go index bcd72f4cea..709035b5ef 100644 --- a/internal/namespaces/registry/v1/custom_image_test.go +++ b/internal/namespaces/registry/v1/custom_image_test.go @@ -4,9 +4,8 @@ import ( "fmt" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" registrySDK "github.com/scaleway/scaleway-sdk-go/api/registry/v1" ) diff --git a/internal/namespaces/registry/v1/custom_login_test.go b/internal/namespaces/registry/v1/custom_login_test.go index 35dc0b199d..96d3280e51 100644 --- a/internal/namespaces/registry/v1/custom_login_test.go +++ b/internal/namespaces/registry/v1/custom_login_test.go @@ -6,10 +6,9 @@ import ( "strings" "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" - "github.com/alecthomas/assert" "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" "github.com/stretchr/testify/require" ) diff --git a/internal/namespaces/registry/v1/custom_logout_test.go b/internal/namespaces/registry/v1/custom_logout_test.go index 559e2ca931..a2dc5d30f3 100644 --- a/internal/namespaces/registry/v1/custom_logout_test.go +++ b/internal/namespaces/registry/v1/custom_logout_test.go @@ -3,9 +3,8 @@ package registry_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1" ) func Test_Logout(t *testing.T) { diff --git a/internal/namespaces/registry/v1/helpers_docker.go b/internal/namespaces/registry/v1/helpers_docker.go index 26c896244d..e728312479 100644 --- a/internal/namespaces/registry/v1/helpers_docker.go +++ b/internal/namespaces/registry/v1/helpers_docker.go @@ -9,9 +9,8 @@ import ( "os" "path" - "github.com/scaleway/scaleway-sdk-go/scw" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-sdk-go/scw" ) const ( diff --git a/internal/namespaces/test/custom/custom_cli_test.go b/internal/namespaces/test/custom/custom_cli_test.go index 9c5f1aeb4e..d4f9702289 100644 --- a/internal/namespaces/test/custom/custom_cli_test.go +++ b/internal/namespaces/test/custom/custom_cli_test.go @@ -3,9 +3,8 @@ package test_test import ( "testing" - test "github.com/scaleway/scaleway-cli/v2/internal/namespaces/test/custom" - "github.com/scaleway/scaleway-cli/v2/internal/core" + test "github.com/scaleway/scaleway-cli/v2/internal/namespaces/test/custom" ) func Test_AnonymousFields(t *testing.T) { diff --git a/internal/namespaces/vpc/v2/custom_private_network_test.go b/internal/namespaces/vpc/v2/custom_private_network_test.go index 21fc1d6d6c..2d83e086f6 100644 --- a/internal/namespaces/vpc/v2/custom_private_network_test.go +++ b/internal/namespaces/vpc/v2/custom_private_network_test.go @@ -3,13 +3,12 @@ package vpc_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" ) func Test_GetPrivateNetwork(t *testing.T) { diff --git a/internal/namespaces/vpcgw/v1/custom_gateway_network_test.go b/internal/namespaces/vpcgw/v1/custom_gateway_network_test.go index ea1eda1b74..da2ac77e97 100644 --- a/internal/namespaces/vpcgw/v1/custom_gateway_network_test.go +++ b/internal/namespaces/vpcgw/v1/custom_gateway_network_test.go @@ -3,10 +3,9 @@ package vpcgw_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1" "github.com/scaleway/scaleway-cli/v2/internal/testhelpers" ) diff --git a/internal/namespaces/vpcgw/v1/custom_gateway_test.go b/internal/namespaces/vpcgw/v1/custom_gateway_test.go index 5573aa2db7..545c207d12 100644 --- a/internal/namespaces/vpcgw/v1/custom_gateway_test.go +++ b/internal/namespaces/vpcgw/v1/custom_gateway_test.go @@ -3,10 +3,9 @@ package vpcgw_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1" "github.com/scaleway/scaleway-cli/v2/internal/testhelpers" ) diff --git a/internal/namespaces/vpcgw/v1/custom_gateway_type_test.go b/internal/namespaces/vpcgw/v1/custom_gateway_type_test.go index a71c856bcc..b304bbab05 100644 --- a/internal/namespaces/vpcgw/v1/custom_gateway_type_test.go +++ b/internal/namespaces/vpcgw/v1/custom_gateway_type_test.go @@ -3,9 +3,8 @@ package vpcgw_test import ( "testing" - "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1" ) func Test_ListGatewayType(t *testing.T) { diff --git a/internal/namespaces/webhosting/v1alpha1/custom_offer_test.go b/internal/namespaces/webhosting/v1alpha1/custom_offer_test.go index 51697c3849..7d73a1c7c8 100644 --- a/internal/namespaces/webhosting/v1alpha1/custom_offer_test.go +++ b/internal/namespaces/webhosting/v1alpha1/custom_offer_test.go @@ -3,9 +3,8 @@ package webhosting_test import ( "testing" - webhosting "github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1alpha1" - "github.com/scaleway/scaleway-cli/v2/internal/core" + webhosting "github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1alpha1" ) func Test_ListOffer(t *testing.T) { diff --git a/internal/terminal/terminal.go b/internal/terminal/terminal.go index da91e49aeb..19634433e8 100644 --- a/internal/terminal/terminal.go +++ b/internal/terminal/terminal.go @@ -5,9 +5,8 @@ package terminal import ( "os" - "golang.org/x/term" - "github.com/fatih/color" + "golang.org/x/term" ) func Style(msg string, styles ...color.Attribute) string {