diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8c9e66065..7df9aee55 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -22,6 +22,10 @@ RUN go install github.com/google/addlicense@latest RUN go install github.com/google/go-licenses@latest +RUN go install mvdan.cc/gofumpt@latest + +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.2 + RUN echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list RUN sudo apt update RUN sudo apt install -y goreleaser curl jq diff --git a/.golangci.yml b/.golangci.yml index 3ae752467..8f2372f30 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,14 +17,14 @@ run: deadline: 20m issues-exit-code: 1 tests: false - skip-dirs: + exclude-dirs: - cicd - docs - test - third-party output: - format: tab + formats: tab print-issued-lines: true print-linter-name: true @@ -32,8 +32,6 @@ linters-settings: errcheck: check-type-assertions: false check-blank: false - govet: - check-shadowing: true golint: min-confidence: 0.8 gofmt: @@ -71,8 +69,9 @@ linters-settings: linters: enable: + - govet - errcheck - - exportloopref +# - copyloopvar - gocritic - gofumpt - revive @@ -112,4 +111,4 @@ issues: text: "shadows declaration" - linters: - staticcheck - text: "SA1019:" \ No newline at end of file + text: "SA1019:" diff --git a/cmd/apigeecli/apigeecli.go b/cmd/apigeecli/apigeecli.go index 6cf342d36..7d36e97fb 100644 --- a/cmd/apigeecli/apigeecli.go +++ b/cmd/apigeecli/apigeecli.go @@ -16,9 +16,8 @@ package main import ( "fmt" - "os" - "internal/cmd" + "os" ) // https://goreleaser.com/cookbooks/using-main.version/?h=ldflags diff --git a/docs/docs.go b/docs/docs.go index abd88bf1c..04a6504b2 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -15,15 +15,7 @@ package main import ( - "io" - "log" - "os" - "path/filepath" - "strings" - - apiclient "internal/apiclient" "internal/cmd" - apicategories "internal/cmd/apicategories" "internal/cmd/apidocs" "internal/cmd/apis" "internal/cmd/appgroups" @@ -32,10 +24,20 @@ import ( "internal/cmd/developers" "internal/cmd/keystores" "internal/cmd/kvm" - products "internal/cmd/products" "internal/cmd/references" "internal/cmd/sharedflows" "internal/cmd/targetservers" + "io" + "log" + "os" + "path/filepath" + "strings" + + apiclient "internal/apiclient" + + apicategories "internal/cmd/apicategories" + + products "internal/cmd/products" "github.com/spf13/cobra/doc" ) diff --git a/internal/apiclient/bundles.go b/internal/apiclient/bundles.go index 785df2351..ea8ee9af0 100644 --- a/internal/apiclient/bundles.go +++ b/internal/apiclient/bundles.go @@ -19,15 +19,14 @@ import ( "bytes" "errors" "fmt" + "internal/clilog" + "internal/cmd/utils" "net/url" "os" "path" "path/filepath" "strings" "sync" - - "internal/clilog" - "internal/cmd/utils" ) // entityPayloadList stores list of entities @@ -55,7 +54,6 @@ func ReadArchive(filename string) ([]byte, error) { } _, err = zip.NewReader(file, fi.Size()) - if err != nil { clilog.Error.Println("invalid archive format: ", err) return nil, err @@ -92,7 +90,6 @@ func ReadBundle(filename string) error { } _, err = zip.NewReader(file, fi.Size()) - if err != nil { clilog.Error.Println("invalid API Proxy Bundle: ", err) return err @@ -153,7 +150,6 @@ func WriteArrayByteArrayToFile(exportFile string, fileAppend bool, payload [][]b payloadFromArray = append(payloadFromArray, byte(']')) _, err = f.Write(payloadFromArray) - if err != nil { clilog.Error.Println("error writing to file: ", err) return err diff --git a/internal/apiclient/clifile.go b/internal/apiclient/clifile.go index 0027e5f5d..d0f298274 100644 --- a/internal/apiclient/clifile.go +++ b/internal/apiclient/clifile.go @@ -16,12 +16,11 @@ package apiclient import ( "encoding/json" + "internal/clilog" "os" "os/user" "path" "time" - - "internal/clilog" ) const ( diff --git a/internal/apiclient/httpclient.go b/internal/apiclient/httpclient.go index cd64ef249..685ac9362 100644 --- a/internal/apiclient/httpclient.go +++ b/internal/apiclient/httpclient.go @@ -20,6 +20,7 @@ import ( "encoding/json" "errors" "fmt" + "internal/clilog" "io" "mime/multipart" "net/http" @@ -29,8 +30,6 @@ import ( "strings" "time" - "internal/clilog" - "golang.org/x/time/rate" ) diff --git a/internal/apiclient/iam.go b/internal/apiclient/iam.go index 165be0fa7..b202a68d0 100644 --- a/internal/apiclient/iam.go +++ b/internal/apiclient/iam.go @@ -18,13 +18,12 @@ import ( "encoding/base64" "encoding/json" "fmt" + "internal/clilog" "net/url" "os" "path" "regexp" "strings" - - "internal/clilog" ) // CrmURL is the endpoint for cloud resource manager @@ -126,7 +125,6 @@ func CreateIAMServiceAccount(name string, iamRole string) (err error) { payload := "{" + strings.Join(iamPayload, ",") + "}" _, err = HttpClient(u.String(), payload) - if err != nil { clilog.Error.Println(err) return err diff --git a/internal/apiclient/options.go b/internal/apiclient/options.go index e427b1839..d9d8cb1ce 100644 --- a/internal/apiclient/options.go +++ b/internal/apiclient/options.go @@ -16,10 +16,9 @@ package apiclient import ( "fmt" + "internal/clilog" "os" "sync" - - "internal/clilog" ) // baseURL is the Apigee control plane endpoint diff --git a/internal/apiclient/shared_test.go b/internal/apiclient/shared_test.go index a1aceb598..e9ab18d80 100644 --- a/internal/apiclient/shared_test.go +++ b/internal/apiclient/shared_test.go @@ -15,9 +15,8 @@ package apiclient import ( - "testing" - "internal/clilog" + "testing" ) func TestInit(t *testing.T) { diff --git a/internal/apiclient/token.go b/internal/apiclient/token.go index c708b9b47..69403080b 100644 --- a/internal/apiclient/token.go +++ b/internal/apiclient/token.go @@ -21,6 +21,7 @@ import ( "encoding/pem" "errors" "fmt" + "internal/clilog" "io" "net/http" "net/url" @@ -30,8 +31,6 @@ import ( "strings" "time" - "internal/clilog" - "github.com/lestrrat-go/jwx/v2/jwa" "github.com/lestrrat-go/jwx/v2/jwt" "golang.org/x/oauth2/google" diff --git a/internal/bundlegen/generateapiv2.go b/internal/bundlegen/generateapiv2.go index b1ff3de98..13361e11c 100644 --- a/internal/bundlegen/generateapiv2.go +++ b/internal/bundlegen/generateapiv2.go @@ -18,6 +18,10 @@ import ( "bytes" "errors" "fmt" + "internal/apiclient" + "internal/bundlegen/policies" + "internal/bundlegen/proxies" + "internal/clilog" "io" "net/url" "os" @@ -25,12 +29,9 @@ import ( "regexp" "strings" - "internal/apiclient" apiproxy "internal/bundlegen/apiproxydef" - "internal/bundlegen/policies" - "internal/bundlegen/proxies" + targets "internal/bundlegen/targets" - "internal/clilog" "github.com/pb33f/libopenapi" validator "github.com/pb33f/libopenapi-validator" diff --git a/internal/bundlegen/generateapiv2_test.go b/internal/bundlegen/generateapiv2_test.go index 37103de60..4dacd5848 100644 --- a/internal/bundlegen/generateapiv2_test.go +++ b/internal/bundlegen/generateapiv2_test.go @@ -16,12 +16,11 @@ package bundlegen import ( "fmt" + "internal/client/clienttest" "os" "path" "regexp" "testing" - - "internal/client/clienttest" ) var cliPath = os.Getenv("APIGEECLI_PATH") diff --git a/internal/bundlegen/generategql.go b/internal/bundlegen/generategql.go index 9d5f8f23a..4e165ebad 100644 --- a/internal/bundlegen/generategql.go +++ b/internal/bundlegen/generategql.go @@ -16,10 +16,11 @@ package bundlegen import ( "fmt" + "internal/bundlegen/proxies" "net/url" apiproxy "internal/bundlegen/apiproxydef" - "internal/bundlegen/proxies" + targets "internal/bundlegen/targets" ) diff --git a/internal/bundlegen/generateswag.go b/internal/bundlegen/generateswag.go index 4a875292c..98c12fc36 100644 --- a/internal/bundlegen/generateswag.go +++ b/internal/bundlegen/generateswag.go @@ -17,6 +17,12 @@ package bundlegen import ( "encoding/json" "fmt" + "internal/apiclient" + "internal/bundlegen/policies" + "internal/bundlegen/proxies" + "internal/bundlegen/targets" + "internal/clilog" + "internal/cmd/utils" "net/url" "os" "path" @@ -25,16 +31,7 @@ import ( "strconv" "strings" - "internal/apiclient" - - "internal/clilog" - apiproxy "internal/bundlegen/apiproxydef" - "internal/bundlegen/policies" - "internal/bundlegen/proxies" - "internal/bundlegen/targets" - - "internal/cmd/utils" "github.com/getkin/kin-openapi/openapi2" "github.com/ghodss/yaml" diff --git a/internal/bundlegen/generateswag_test.go b/internal/bundlegen/generateswag_test.go index 593941a23..12635c6ec 100644 --- a/internal/bundlegen/generateswag_test.go +++ b/internal/bundlegen/generateswag_test.go @@ -16,10 +16,9 @@ package bundlegen import ( "fmt" + "internal/client/clienttest" "path" "testing" - - "internal/client/clienttest" ) var swagSpecNames = []string{ diff --git a/internal/bundlegen/proxybundle/proxybundle.go b/internal/bundlegen/proxybundle/proxybundle.go index 4dd2cb1a1..b0d66feb6 100644 --- a/internal/bundlegen/proxybundle/proxybundle.go +++ b/internal/bundlegen/proxybundle/proxybundle.go @@ -19,6 +19,10 @@ import ( "context" "errors" "fmt" + "internal/apiclient" + "internal/bundlegen" + "internal/bundlegen/targets" + "internal/clilog" "io" "net/http" "net/url" @@ -28,16 +32,12 @@ import ( "regexp" "strings" - "internal/apiclient" - "internal/clilog" - - "internal/bundlegen" genapi "internal/bundlegen" apiproxy "internal/bundlegen/apiproxydef" policies "internal/bundlegen/policies" proxies "internal/bundlegen/proxies" sf "internal/bundlegen/sharedflowdef" - "internal/bundlegen/targets" + target "internal/bundlegen/targets" "github.com/google/go-github/github" diff --git a/internal/bundlegen/proxybundle/proxybundle_test.go b/internal/bundlegen/proxybundle/proxybundle_test.go index 957f21727..e0dcb49b3 100644 --- a/internal/bundlegen/proxybundle/proxybundle_test.go +++ b/internal/bundlegen/proxybundle/proxybundle_test.go @@ -15,13 +15,12 @@ package proxybundle import ( + "internal/bundlegen" + "internal/client/clienttest" "os" "path" "regexp" "testing" - - "internal/bundlegen" - "internal/client/clienttest" ) var specName = "petstore-v3.1.yaml" diff --git a/internal/client/apicategories/apicategories.go b/internal/client/apicategories/apicategories.go index 20b63a3b9..072b73ae8 100644 --- a/internal/client/apicategories/apicategories.go +++ b/internal/client/apicategories/apicategories.go @@ -18,17 +18,15 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/client/sites" + "internal/clilog" "io" "net/url" "os" "path" "strings" - "internal/apiclient" - - "internal/client/sites" - "internal/clilog" - "github.com/thedevsaddam/gojsonq" ) diff --git a/internal/client/apicategories/apicategories_test.go b/internal/client/apicategories/apicategories_test.go index fff49413b..aec9abe59 100644 --- a/internal/client/apicategories/apicategories_test.go +++ b/internal/client/apicategories/apicategories_test.go @@ -17,10 +17,9 @@ package apicategories import ( "encoding/json" "fmt" + "internal/client/clienttest" "os" "testing" - - "internal/client/clienttest" ) const ( diff --git a/internal/client/apidocs/apidocs.go b/internal/client/apidocs/apidocs.go index 5aa00462e..3fa846377 100644 --- a/internal/client/apidocs/apidocs.go +++ b/internal/client/apidocs/apidocs.go @@ -19,16 +19,15 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/client/sites" + "internal/cmd/utils" "io" "net/url" "os" "path" "strconv" "strings" - - "internal/apiclient" - "internal/client/sites" - "internal/cmd/utils" ) type Action uint8 diff --git a/internal/client/apidocs/apidocs_test.go b/internal/client/apidocs/apidocs_test.go index fb86e394e..339301466 100644 --- a/internal/client/apidocs/apidocs_test.go +++ b/internal/client/apidocs/apidocs_test.go @@ -17,12 +17,11 @@ package apidocs import ( "encoding/json" "fmt" + "internal/client/clienttest" + "internal/cmd/utils" "os" "path" "testing" - - "internal/client/clienttest" - "internal/cmd/utils" ) var ( diff --git a/internal/client/apis/apis.go b/internal/client/apis/apis.go index e848a95e7..e0a5852bd 100644 --- a/internal/client/apis/apis.go +++ b/internal/client/apis/apis.go @@ -19,6 +19,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "mime/multipart" "net/http" @@ -30,10 +32,6 @@ import ( "strings" "sync" "time" - - "internal/apiclient" - - "internal/clilog" ) type proxies struct { diff --git a/internal/client/apis/apis_test.go b/internal/client/apis/apis_test.go index 384a5094c..e29d72ca2 100644 --- a/internal/client/apis/apis_test.go +++ b/internal/client/apis/apis_test.go @@ -15,11 +15,10 @@ package apis import ( + "internal/client/clienttest" "os" "path" "testing" - - "internal/client/clienttest" ) // go test internal/client/apis diff --git a/internal/client/apis/kvm.go b/internal/client/apis/kvm.go index 62809375d..8cda9078f 100644 --- a/internal/client/apis/kvm.go +++ b/internal/client/apis/kvm.go @@ -15,11 +15,10 @@ package apis import ( + "internal/apiclient" "net/url" "path" "strconv" - - "internal/apiclient" ) // CreateProxyKVM diff --git a/internal/client/apis/kvm_test.go b/internal/client/apis/kvm_test.go index 71c61c5b1..687672f99 100644 --- a/internal/client/apis/kvm_test.go +++ b/internal/client/apis/kvm_test.go @@ -15,9 +15,8 @@ package apis import ( - "testing" - "internal/client/clienttest" + "testing" ) const ( diff --git a/internal/client/apis/trace.go b/internal/client/apis/trace.go index abefbdf3c..bca1cf673 100644 --- a/internal/client/apis/trace.go +++ b/internal/client/apis/trace.go @@ -17,11 +17,10 @@ package apis import ( "bytes" "fmt" + "internal/apiclient" "net/url" "path" "strconv" - - "internal/apiclient" ) func getFilterStr(filter map[string]string) string { diff --git a/internal/client/apis/trace_test.go b/internal/client/apis/trace_test.go index 3232f0c07..c1f8ef9df 100644 --- a/internal/client/apis/trace_test.go +++ b/internal/client/apis/trace_test.go @@ -15,9 +15,8 @@ package apis import ( - "testing" - "internal/client/clienttest" + "testing" ) func TestListTracceSession(t *testing.T) { diff --git a/internal/client/appgroups/app.go b/internal/client/appgroups/app.go index 727be1995..6dbfe300c 100644 --- a/internal/client/appgroups/app.go +++ b/internal/client/appgroups/app.go @@ -18,6 +18,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "net/url" "os" @@ -25,9 +27,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - "internal/clilog" ) type appgroupapps struct { diff --git a/internal/client/appgroups/app_test.go b/internal/client/appgroups/app_test.go index b9caa11d2..ca696fef6 100644 --- a/internal/client/appgroups/app_test.go +++ b/internal/client/appgroups/app_test.go @@ -15,11 +15,10 @@ package appgroups import ( - "os" - "testing" - "internal/client/clienttest" "internal/client/products" + "os" + "testing" ) const ( diff --git a/internal/client/appgroups/appgroups.go b/internal/client/appgroups/appgroups.go index 3f328b7e1..d576979ef 100644 --- a/internal/client/appgroups/appgroups.go +++ b/internal/client/appgroups/appgroups.go @@ -18,6 +18,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "net/url" "os" @@ -25,9 +27,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - "internal/clilog" ) type appgroups struct { diff --git a/internal/client/appgroups/appgroups_test.go b/internal/client/appgroups/appgroups_test.go index 316015f83..7e8fad986 100644 --- a/internal/client/appgroups/appgroups_test.go +++ b/internal/client/appgroups/appgroups_test.go @@ -15,9 +15,8 @@ package appgroups import ( - "testing" - "internal/client/clienttest" + "testing" ) const ( diff --git a/internal/client/appgroups/keys.go b/internal/client/appgroups/keys.go index bae1a00b1..220f68817 100644 --- a/internal/client/appgroups/keys.go +++ b/internal/client/appgroups/keys.go @@ -16,11 +16,10 @@ package appgroups import ( "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) // CreateKey @@ -57,7 +56,6 @@ func CreateKey(name string, appName string, consumerKey string, consumerSecret s apiclient.ClientPrintHttpResponse.Set(false) } respBody, err = apiclient.HttpClient(u.String(), payload) - if err != nil { return respBody, err } diff --git a/internal/client/appgroups/keys_test.go b/internal/client/appgroups/keys_test.go index 70fbe6059..5224beef4 100644 --- a/internal/client/appgroups/keys_test.go +++ b/internal/client/appgroups/keys_test.go @@ -15,9 +15,8 @@ package appgroups import ( - "testing" - "internal/client/clienttest" + "testing" ) func TestCreateKey(t *testing.T) { diff --git a/internal/client/apps/apps.go b/internal/client/apps/apps.go index 66dcbd245..e622edb07 100644 --- a/internal/client/apps/apps.go +++ b/internal/client/apps/apps.go @@ -17,6 +17,9 @@ package apps import ( "encoding/json" "fmt" + "internal/apiclient" + "internal/client/developers" + "internal/clilog" "io" "net/url" "os" @@ -25,12 +28,6 @@ import ( "strings" "sync" - "internal/apiclient" - - "internal/clilog" - - "internal/client/developers" - "github.com/thedevsaddam/gojsonq" ) diff --git a/internal/client/apps/apps_test.go b/internal/client/apps/apps_test.go index 530a7a4c8..fb4954f0f 100644 --- a/internal/client/apps/apps_test.go +++ b/internal/client/apps/apps_test.go @@ -17,12 +17,11 @@ package apps import ( "encoding/json" "fmt" - "os" - "testing" - "internal/client/clienttest" "internal/client/developers" "internal/client/products" + "os" + "testing" ) const ( diff --git a/internal/client/apps/keys.go b/internal/client/apps/keys.go index 43e99dfe6..e70fb6768 100644 --- a/internal/client/apps/keys.go +++ b/internal/client/apps/keys.go @@ -17,11 +17,10 @@ package apps import ( "encoding/json" "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) // CreateKey @@ -58,7 +57,6 @@ func CreateKey(developerEmail string, appID string, consumerKey string, consumer apiclient.ClientPrintHttpResponse.Set(false) } respBody, err = apiclient.HttpClient(u.String(), payload) - if err != nil { return respBody, err } diff --git a/internal/client/apps/keys_test.go b/internal/client/apps/keys_test.go index acc7b7a73..527282f26 100644 --- a/internal/client/apps/keys_test.go +++ b/internal/client/apps/keys_test.go @@ -15,9 +15,8 @@ package apps import ( - "testing" - "internal/client/clienttest" + "testing" ) func TestCreateKey(t *testing.T) { diff --git a/internal/client/cache/cache.go b/internal/client/cache/cache.go index 23c497833..27fd97bb0 100644 --- a/internal/client/cache/cache.go +++ b/internal/client/cache/cache.go @@ -15,10 +15,9 @@ package cache import ( + "internal/apiclient" "net/url" "path" - - "internal/apiclient" ) // Delete diff --git a/internal/client/cache/cache_test.go b/internal/client/cache/cache_test.go index 041270cc0..e5af2b080 100644 --- a/internal/client/cache/cache_test.go +++ b/internal/client/cache/cache_test.go @@ -15,9 +15,8 @@ package cache import ( - "testing" - "internal/client/clienttest" + "testing" ) func TestList(t *testing.T) { diff --git a/internal/client/clienttest/clienttest.go b/internal/client/clienttest/clienttest.go index f9eb80cc5..58524f879 100644 --- a/internal/client/clienttest/clienttest.go +++ b/internal/client/clienttest/clienttest.go @@ -16,9 +16,8 @@ package clienttest import ( "fmt" - "os" - "internal/apiclient" + "os" ) type TestRequirements uint8 diff --git a/internal/client/datacollectors/datacollectors.go b/internal/client/datacollectors/datacollectors.go index e4c096f80..40e47412a 100644 --- a/internal/client/datacollectors/datacollectors.go +++ b/internal/client/datacollectors/datacollectors.go @@ -16,13 +16,12 @@ package datacollectors import ( "encoding/json" + "internal/apiclient" "io" "net/url" "os" "path" "strings" - - "internal/apiclient" ) type dcollectors struct { @@ -115,7 +114,6 @@ func readDataCollectorsFile(filePath string) (dcollectors, error) { } err = json.Unmarshal(byteValue, &dCollectors) - if err != nil { return dCollectors, err } diff --git a/internal/client/datacollectors/datacollectors_test.go b/internal/client/datacollectors/datacollectors_test.go index 8ac4bbf79..120fe0332 100644 --- a/internal/client/datacollectors/datacollectors_test.go +++ b/internal/client/datacollectors/datacollectors_test.go @@ -15,9 +15,8 @@ package datacollectors import ( - "testing" - "internal/client/clienttest" + "testing" ) const name = "test" diff --git a/internal/client/datastores/datastores.go b/internal/client/datastores/datastores.go index 0adebd962..928b2dfa6 100644 --- a/internal/client/datastores/datastores.go +++ b/internal/client/datastores/datastores.go @@ -17,11 +17,10 @@ package datastores import ( "encoding/json" "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) type axdatastores struct { diff --git a/internal/client/developers/balance.go b/internal/client/developers/balance.go index ff6481aa0..fae7ac3b9 100644 --- a/internal/client/developers/balance.go +++ b/internal/client/developers/balance.go @@ -16,10 +16,9 @@ package developers import ( "encoding/json" + "internal/apiclient" "net/url" "path" - - "internal/apiclient" ) type developerAdjustment struct { diff --git a/internal/client/developers/developers.go b/internal/client/developers/developers.go index d0adb0553..c36605e9a 100644 --- a/internal/client/developers/developers.go +++ b/internal/client/developers/developers.go @@ -18,6 +18,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "net/url" "os" @@ -25,10 +27,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - - "internal/clilog" ) // Appdevelopers holds a single developer @@ -356,7 +354,6 @@ func ReadDevelopersFile(filePath string) (Appdevelopers, error) { } err = json.Unmarshal(byteValue, &devs) - if err != nil { return devs, err } diff --git a/internal/client/developers/developers_test.go b/internal/client/developers/developers_test.go index 7165cf74e..bd4448b6b 100644 --- a/internal/client/developers/developers_test.go +++ b/internal/client/developers/developers_test.go @@ -15,9 +15,8 @@ package developers import ( - "testing" - "internal/client/clienttest" + "testing" ) const email = "user@example.com" diff --git a/internal/client/developers/subscriptions.go b/internal/client/developers/subscriptions.go index 9e2dc7146..12806d2aa 100644 --- a/internal/client/developers/subscriptions.go +++ b/internal/client/developers/subscriptions.go @@ -15,11 +15,10 @@ package developers import ( + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) func CreateSubscription(email string, name string, apiproduct string, startTime string, endTime string) (respBody []byte, err error) { diff --git a/internal/client/env/archives.go b/internal/client/env/archives.go index 3c9620e04..1e11bb937 100644 --- a/internal/client/env/archives.go +++ b/internal/client/env/archives.go @@ -17,11 +17,10 @@ package env import ( "encoding/json" "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) // generateUploadURL diff --git a/internal/client/env/debugmask.go b/internal/client/env/debugmask.go index b9b883145..8fd7535e4 100644 --- a/internal/client/env/debugmask.go +++ b/internal/client/env/debugmask.go @@ -16,10 +16,9 @@ package env import ( "encoding/json" + "internal/apiclient" "net/url" "path" - - "internal/apiclient" ) // GetDebug diff --git a/internal/client/env/debugmask_test.go b/internal/client/env/debugmask_test.go index d5669eae6..d6cdd4434 100644 --- a/internal/client/env/debugmask_test.go +++ b/internal/client/env/debugmask_test.go @@ -15,13 +15,12 @@ package env import ( - "os" - "path" - "testing" - "internal/apiclient" "internal/client/clienttest" "internal/cmd/utils" + "os" + "path" + "testing" ) var cliPath = os.Getenv("APIGEECLI_PATH") diff --git a/internal/client/env/env.go b/internal/client/env/env.go index 75a181941..12a995cdf 100644 --- a/internal/client/env/env.go +++ b/internal/client/env/env.go @@ -18,14 +18,13 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "net/url" "os" "path" "strings" - - "internal/apiclient" - "internal/clilog" ) type Environments struct { @@ -403,7 +402,6 @@ func MarshalEnvironmentList(contents []byte) (envronmentList Environments, err e } func GetAddonsConfig(environment string) (respBody []byte, err error) { - if environment == "" { environment = apiclient.GetApigeeEnv() } diff --git a/internal/client/env/env_test.go b/internal/client/env/env_test.go index ade316336..631b0694c 100644 --- a/internal/client/env/env_test.go +++ b/internal/client/env/env_test.go @@ -15,10 +15,9 @@ package env import ( - "testing" - "internal/apiclient" "internal/client/clienttest" + "testing" ) const name = "unittest-env" diff --git a/internal/client/env/iam.go b/internal/client/env/iam.go index 745d3ca1a..0027206a1 100644 --- a/internal/client/env/iam.go +++ b/internal/client/env/iam.go @@ -16,11 +16,10 @@ package env import ( "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) var validMemberTypes = []string{"serviceAccount", "group", "user", "domain"} diff --git a/internal/client/env/reports.go b/internal/client/env/reports.go index d58eb0760..df43b6568 100644 --- a/internal/client/env/reports.go +++ b/internal/client/env/reports.go @@ -17,6 +17,8 @@ package env import ( "encoding/json" "fmt" + "internal/apiclient" + "internal/clilog" "net/url" "os" "path" @@ -24,10 +26,6 @@ import ( "sync" "text/tabwriter" "time" - - "internal/apiclient" - - "internal/clilog" ) const ( @@ -65,8 +63,8 @@ type apiCalls struct { var ApiCalls = &apiCalls{count: 0} func TotalAPICallsInMonth(dimension bool, environment string, month int, year int, - envDetails bool, billingType string) { - + envDetails bool, billingType string, +) { var totalApiCalls, totalExtensible, totalStandard int var err error var analyticsAddon bool diff --git a/internal/client/env/securityactions.go b/internal/client/env/securityactions.go index e77541503..d1ccff41a 100644 --- a/internal/client/env/securityactions.go +++ b/internal/client/env/securityactions.go @@ -16,11 +16,10 @@ package env import ( "encoding/json" + "internal/apiclient" "net/url" "path" "strconv" - - "internal/apiclient" ) type securityAction struct { diff --git a/internal/client/env/securityincidents.go b/internal/client/env/securityincidents.go index 947c9cebb..fc9548108 100644 --- a/internal/client/env/securityincidents.go +++ b/internal/client/env/securityincidents.go @@ -15,11 +15,10 @@ package env import ( + "internal/apiclient" "net/url" "path" "strconv" - - "internal/apiclient" ) // GetSecurityIncident diff --git a/internal/client/env/securityreports.go b/internal/client/env/securityreports.go index 2f064338c..824da200f 100644 --- a/internal/client/env/securityreports.go +++ b/internal/client/env/securityreports.go @@ -15,11 +15,10 @@ package env import ( + "internal/apiclient" "net/url" "path" "strconv" - - "internal/apiclient" ) // GetSecurityReportView diff --git a/internal/client/env/traceconfig.go b/internal/client/env/traceconfig.go index 37ff5e145..0478eee1c 100644 --- a/internal/client/env/traceconfig.go +++ b/internal/client/env/traceconfig.go @@ -17,11 +17,10 @@ package env import ( "encoding/json" "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) type traceCfg struct { diff --git a/internal/client/env/traceoverrides.go b/internal/client/env/traceoverrides.go index c4b1e053f..c239243a6 100644 --- a/internal/client/env/traceoverrides.go +++ b/internal/client/env/traceoverrides.go @@ -16,11 +16,10 @@ package env import ( "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) func CreateTraceOverrides(apiproxy string, exporter string, endpoint string, sampler string, sample_rate string) (respBody []byte, err error) { diff --git a/internal/client/envgroups/envgroups.go b/internal/client/envgroups/envgroups.go index ccf68e048..e7c51b775 100644 --- a/internal/client/envgroups/envgroups.go +++ b/internal/client/envgroups/envgroups.go @@ -17,13 +17,12 @@ package envgroups import ( "encoding/json" "fmt" + "internal/apiclient" "io" "net/url" "os" "path" "strings" - - "internal/apiclient" ) type environmentgroups struct { @@ -201,7 +200,6 @@ func readEnvGroupsFile(filePath string) (environmentgroups, error) { } err = json.Unmarshal(byteValue, &environmentGroups) - if err != nil { return environmentGroups, err } diff --git a/internal/client/envgroups/envgroups_test.go b/internal/client/envgroups/envgroups_test.go index be9444bb7..371d98c03 100644 --- a/internal/client/envgroups/envgroups_test.go +++ b/internal/client/envgroups/envgroups_test.go @@ -15,10 +15,9 @@ package envgroups import ( + "internal/client/clienttest" "os" "testing" - - "internal/client/clienttest" ) const name = "test" diff --git a/internal/client/eptattachment/eptattchment.go b/internal/client/eptattachment/eptattchment.go index 8ec2a8441..11d7ccb44 100644 --- a/internal/client/eptattachment/eptattchment.go +++ b/internal/client/eptattachment/eptattchment.go @@ -15,11 +15,10 @@ package eptattachment import ( + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) // Create diff --git a/internal/client/flowhooks/flowhook_test.go b/internal/client/flowhooks/flowhook_test.go index 64b326eb3..bbba65ea7 100644 --- a/internal/client/flowhooks/flowhook_test.go +++ b/internal/client/flowhooks/flowhook_test.go @@ -15,12 +15,11 @@ package flowhooks import ( + "internal/client/clienttest" + "internal/client/sharedflows" "os" "path" "testing" - - "internal/client/clienttest" - "internal/client/sharedflows" ) var cliPath = os.Getenv("APIGEECLI_PATH") diff --git a/internal/client/flowhooks/flowhooks.go b/internal/client/flowhooks/flowhooks.go index ecc286921..cbc3c0e8e 100644 --- a/internal/client/flowhooks/flowhooks.go +++ b/internal/client/flowhooks/flowhooks.go @@ -15,12 +15,11 @@ package flowhooks import ( + "internal/apiclient" "net/url" "path" "strconv" "strings" - - "internal/apiclient" ) // Attach diff --git a/internal/client/hub/hub.go b/internal/client/hub/hub.go index 3b503e05e..73f4990cd 100644 --- a/internal/client/hub/hub.go +++ b/internal/client/hub/hub.go @@ -19,16 +19,15 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" + "internal/cmd/utils" "net/url" "os" "path" "path/filepath" "strconv" "strings" - - "internal/apiclient" - "internal/clilog" - "internal/cmd/utils" ) type DeploymentType string @@ -345,7 +344,6 @@ func ListApiVersions(apiID string, filter string, pageSize int, pageToken string } func UpdateApiVersion(versionID string, apiID string, contents []byte) (respBody []byte, err error) { - var updateMasks []string type apiversion struct { @@ -1267,7 +1265,6 @@ func (s *SloType) Type() string { } func getSpecIDList(s []byte) (sList []string) { - type spec struct { Name string `json:"name,omitempty"` DisplayName string `json:"displayName,omitempty"` diff --git a/internal/client/hub/hub_test.go b/internal/client/hub/hub_test.go index 48a2dc1f2..e4fdddae6 100644 --- a/internal/client/hub/hub_test.go +++ b/internal/client/hub/hub_test.go @@ -15,12 +15,11 @@ package hub import ( + "internal/client/clienttest" + "internal/cmd/utils" "os" "path" "testing" - - "internal/client/clienttest" - "internal/cmd/utils" ) var cliPath = os.Getenv("APIGEECLI_PATH") diff --git a/internal/client/instances/attachments.go b/internal/client/instances/attachments.go index 6177de1cf..ab3d02b43 100644 --- a/internal/client/instances/attachments.go +++ b/internal/client/instances/attachments.go @@ -17,11 +17,10 @@ package instances import ( "encoding/json" "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) const interval = 10 diff --git a/internal/client/instances/instances.go b/internal/client/instances/instances.go index 1ef907db7..edb4f4c1a 100644 --- a/internal/client/instances/instances.go +++ b/internal/client/instances/instances.go @@ -16,11 +16,10 @@ package instances import ( "encoding/json" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) // Create diff --git a/internal/client/instances/nat.go b/internal/client/instances/nat.go index 3d6c93297..2441f67a7 100644 --- a/internal/client/instances/nat.go +++ b/internal/client/instances/nat.go @@ -15,11 +15,10 @@ package instances import ( + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) // ReserveNatIP diff --git a/internal/client/keyaliases/keyaliases.go b/internal/client/keyaliases/keyaliases.go index f4df7f42d..b6c610562 100644 --- a/internal/client/keyaliases/keyaliases.go +++ b/internal/client/keyaliases/keyaliases.go @@ -17,12 +17,10 @@ package keyaliases import ( "encoding/json" "fmt" - "net/url" - "path" - "internal/apiclient" - "internal/cmd/utils" + "net/url" + "path" ) type certificate struct { diff --git a/internal/client/keyaliases/keyaliases_test.go b/internal/client/keyaliases/keyaliases_test.go index 670db0876..d17166309 100644 --- a/internal/client/keyaliases/keyaliases_test.go +++ b/internal/client/keyaliases/keyaliases_test.go @@ -15,12 +15,11 @@ package keyaliases import ( + "internal/client/clienttest" + "internal/client/keystores" "os" "path" "testing" - - "internal/client/clienttest" - "internal/client/keystores" ) const ( diff --git a/internal/client/keystores/keystores.go b/internal/client/keystores/keystores.go index a4b1e3c66..596382cd3 100644 --- a/internal/client/keystores/keystores.go +++ b/internal/client/keystores/keystores.go @@ -18,18 +18,16 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/client/keyaliases" + "internal/clilog" + "internal/cmd/utils" "net/http" "net/url" "os" "path" "strings" "sync" - - "internal/apiclient" - "internal/client/keyaliases" - "internal/cmd/utils" - - "internal/clilog" ) // Create @@ -84,7 +82,7 @@ func Export(folder string) (err error) { for _, k := range ks { ksFolder := path.Join(folder, "keystore"+utils.DefaultFileSplitter+apiclient.GetApigeeEnv()+utils.DefaultFileSplitter+k) - err = os.MkdirAll(ksFolder, 0755) + err = os.MkdirAll(ksFolder, 0o755) if err != nil { return err } diff --git a/internal/client/keystores/keystores_test.go b/internal/client/keystores/keystores_test.go index 957eae09b..b1ca9f263 100644 --- a/internal/client/keystores/keystores_test.go +++ b/internal/client/keystores/keystores_test.go @@ -15,9 +15,8 @@ package keystores import ( - "testing" - "internal/client/clienttest" + "testing" ) const name = "test" diff --git a/internal/client/kvm/entries.go b/internal/client/kvm/entries.go index 7cc49f12a..09615d7db 100644 --- a/internal/client/kvm/entries.go +++ b/internal/client/kvm/entries.go @@ -18,6 +18,10 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/client/apis" + "internal/clilog" + "internal/cmd/utils" "io" "net/url" "os" @@ -25,12 +29,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - "internal/client/apis" - - "internal/clilog" - "internal/cmd/utils" ) type keyvalueentry struct { @@ -254,7 +252,6 @@ func ExportEntries(proxyName string, mapName string) (payload [][]byte, err erro // ImportEntries func ImportEntries(proxyName string, mapName string, conn int, filePath string) (err error) { - kvmEntries, err := readKVMfile(filePath) if err != nil { clilog.Error.Println("Error reading file: ", err) @@ -313,7 +310,6 @@ func batchImport(wg *sync.WaitGroup, proxyName string, mapName string, jobs <-ch } _, err = upsertEntry(proxyName, mapName, job.Name, string(job.Value), true) - if err != nil { errs <- err continue @@ -337,7 +333,6 @@ func readKVMfile(filePath string) (kvmEntries keyvalueentries, err error) { } err = json.Unmarshal(byteValue, &kvmEntries) - if err != nil { return kvmEntries, err } diff --git a/internal/client/kvm/entries_test.go b/internal/client/kvm/entries_test.go index 975aa66be..19e3cc943 100644 --- a/internal/client/kvm/entries_test.go +++ b/internal/client/kvm/entries_test.go @@ -15,10 +15,9 @@ package kvm import ( - "testing" - "internal/apiclient" "internal/client/clienttest" + "testing" ) const ( diff --git a/internal/client/kvm/kvm.go b/internal/client/kvm/kvm.go index 936c0132d..4a2f75d31 100644 --- a/internal/client/kvm/kvm.go +++ b/internal/client/kvm/kvm.go @@ -15,12 +15,11 @@ package kvm import ( + "internal/apiclient" "net/url" "path" "strconv" "strings" - - "internal/apiclient" ) // Create diff --git a/internal/client/kvm/kvm_test.go b/internal/client/kvm/kvm_test.go index f7a6b56a2..fee70ef93 100644 --- a/internal/client/kvm/kvm_test.go +++ b/internal/client/kvm/kvm_test.go @@ -15,13 +15,12 @@ package kvm import ( - "os" - "path" - "testing" - "internal/apiclient" "internal/client/apis" "internal/client/clienttest" + "os" + "path" + "testing" ) const ( diff --git a/internal/client/operations/operations.go b/internal/client/operations/operations.go index f1ab6a536..be48e739d 100644 --- a/internal/client/operations/operations.go +++ b/internal/client/operations/operations.go @@ -16,12 +16,11 @@ package operations import ( "encoding/json" + "internal/apiclient" + "internal/clilog" "net/url" "path" "time" - - "internal/apiclient" - "internal/clilog" ) type ops struct { diff --git a/internal/client/operations/operations_test.go b/internal/client/operations/operations_test.go index b380bf21a..d2dd5fb2c 100644 --- a/internal/client/operations/operations_test.go +++ b/internal/client/operations/operations_test.go @@ -15,9 +15,8 @@ package operations import ( - "testing" - "internal/client/clienttest" + "testing" ) func TestList(t *testing.T) { diff --git a/internal/client/orgs/orgs.go b/internal/client/orgs/orgs.go index c15273ff9..557954668 100644 --- a/internal/client/orgs/orgs.go +++ b/internal/client/orgs/orgs.go @@ -17,13 +17,11 @@ package orgs import ( "encoding/json" "fmt" + "internal/apiclient" + "internal/clilog" "net/url" "path" "strings" - - "internal/apiclient" - - "internal/clilog" ) var analyticsRegions = [...]string{ @@ -372,7 +370,8 @@ func Update(description string, authorizedNetwork string) (respBody []byte, err // SetAddons func SetAddons(advancedApiOpsConfig bool, integrationConfig bool, monetizationConfig bool, connectorsConfig bool, - apiSecurityConfig bool, analyticsConfig bool) (respBody []byte, err error) { + apiSecurityConfig bool, analyticsConfig bool, +) (respBody []byte, err error) { apiclient.ClientPrintHttpResponse.Set(false) orgRespBody, err := Get() diff --git a/internal/client/orgs/orgs_test.go b/internal/client/orgs/orgs_test.go index 897099b81..1b83f4eca 100644 --- a/internal/client/orgs/orgs_test.go +++ b/internal/client/orgs/orgs_test.go @@ -15,10 +15,9 @@ package orgs import ( - "testing" - "internal/apiclient" "internal/client/clienttest" + "testing" ) func TestList(t *testing.T) { diff --git a/internal/client/orgs/reports.go b/internal/client/orgs/reports.go index 2679bf13d..d9284f6da 100644 --- a/internal/client/orgs/reports.go +++ b/internal/client/orgs/reports.go @@ -17,18 +17,15 @@ package orgs import ( "encoding/json" "fmt" - "time" - "internal/apiclient" - - "internal/clilog" - "internal/client/env" + "internal/clilog" + "time" ) func TotalAPICallsInMonth(month int, year int, envDetails bool, - proxyType bool, billingType string) (apiCalls int, extensibleApiCalls int, standardApiCalls int, err error) { - + proxyType bool, billingType string, +) (apiCalls int, extensibleApiCalls int, standardApiCalls int, err error) { var envListBytes []byte var envList []string @@ -61,7 +58,8 @@ func batchReport(envList []string, month int, year int, envDetails bool, proxyTy } func TotalAPICallsInYear(year int, envDetails bool, - proxyType bool, billingType string) (apiCalls int, extensibleApiCalls int, standardApiCalls int, err error) { + proxyType bool, billingType string, +) (apiCalls int, extensibleApiCalls int, standardApiCalls int, err error) { var monthlyApiTotal, monthlyExtensibleTotal, monthlyStandardTotal int t := time.Now() @@ -74,8 +72,7 @@ func TotalAPICallsInYear(year int, envDetails bool, if currentYear == year { currentMonth := t.Month() for i := 1; i <= int(currentMonth); i++ { // run the loop only till the current month - if monthlyApiTotal, monthlyExtensibleTotal, monthlyStandardTotal, err = - TotalAPICallsInMonth(i, year, envDetails, proxyType, billingType); err != nil { + if monthlyApiTotal, monthlyExtensibleTotal, monthlyStandardTotal, err = TotalAPICallsInMonth(i, year, envDetails, proxyType, billingType); err != nil { return -1, -1, -1, err } apiCalls = apiCalls + monthlyApiTotal @@ -84,8 +81,7 @@ func TotalAPICallsInYear(year int, envDetails bool, } } else { for i := 1; i <= 12; i++ { // run the loop for each month - if monthlyApiTotal, monthlyExtensibleTotal, monthlyStandardTotal, err = - TotalAPICallsInMonth(i, year, envDetails, proxyType, billingType); err != nil { + if monthlyApiTotal, monthlyExtensibleTotal, monthlyStandardTotal, err = TotalAPICallsInMonth(i, year, envDetails, proxyType, billingType); err != nil { return -1, -1, -1, err } apiCalls = apiCalls + monthlyApiTotal diff --git a/internal/client/orgs/reports_test.go b/internal/client/orgs/reports_test.go index a5d949ac6..9de2c9426 100644 --- a/internal/client/orgs/reports_test.go +++ b/internal/client/orgs/reports_test.go @@ -15,10 +15,9 @@ package orgs import ( + "internal/client/clienttest" "testing" "time" - - "internal/client/clienttest" ) func TestTotalAPICallsInMonth(t *testing.T) { diff --git a/internal/client/products/products.go b/internal/client/products/products.go index f126393b9..01e9cb6cd 100644 --- a/internal/client/products/products.go +++ b/internal/client/products/products.go @@ -17,6 +17,8 @@ package products import ( "encoding/json" "errors" + "internal/apiclient" + "internal/clilog" "io" "net/url" "os" @@ -24,10 +26,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - - "internal/clilog" ) type apiProducts struct { @@ -467,7 +465,6 @@ func readProductsFile(filePath string) ([]APIProduct, error) { } err = json.Unmarshal(byteValue, &products) - if err != nil { return products, err } diff --git a/internal/client/products/products_test.go b/internal/client/products/products_test.go index 3f928a9e1..543275740 100644 --- a/internal/client/products/products_test.go +++ b/internal/client/products/products_test.go @@ -16,12 +16,11 @@ package products import ( "encoding/json" + "internal/client/clienttest" + "internal/clilog" "os" "path" "testing" - - "internal/client/clienttest" - "internal/clilog" ) const name = "test" diff --git a/internal/client/products/rateplans.go b/internal/client/products/rateplans.go index 7140f941e..f6e1c8e08 100644 --- a/internal/client/products/rateplans.go +++ b/internal/client/products/rateplans.go @@ -15,10 +15,9 @@ package products import ( + "internal/apiclient" "net/url" "path" - - "internal/apiclient" ) // CreateRatePlan diff --git a/internal/client/references/references.go b/internal/client/references/references.go index 72bf83f26..323844dcd 100644 --- a/internal/client/references/references.go +++ b/internal/client/references/references.go @@ -19,6 +19,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "net/http" "net/url" @@ -26,10 +28,6 @@ import ( "path" "strings" "sync" - - "internal/apiclient" - - "internal/clilog" ) type ref struct { diff --git a/internal/client/references/references_test.go b/internal/client/references/references_test.go index 0b721f7b5..438980fbd 100644 --- a/internal/client/references/references_test.go +++ b/internal/client/references/references_test.go @@ -15,12 +15,11 @@ package references import ( - "testing" - "internal/apiclient" "internal/client/clienttest" "internal/client/env" "internal/client/keystores" + "testing" ) const ( diff --git a/internal/client/res/res.go b/internal/client/res/res.go index 911920ca0..529d6fac9 100644 --- a/internal/client/res/res.go +++ b/internal/client/res/res.go @@ -16,10 +16,9 @@ package res import ( "fmt" + "internal/apiclient" "net/url" "path" - - "internal/apiclient" ) // validResourceTypes contains a list of valid resources diff --git a/internal/client/res/res_test.go b/internal/client/res/res_test.go index 00ed75647..299b7ccb0 100644 --- a/internal/client/res/res_test.go +++ b/internal/client/res/res_test.go @@ -15,11 +15,10 @@ package res import ( + "internal/client/clienttest" "os" "path" "testing" - - "internal/client/clienttest" ) var cliPath = os.Getenv("APIGEECLI_PATH") diff --git a/internal/client/securityprofiles/securityprofiles.go b/internal/client/securityprofiles/securityprofiles.go index 422d029c2..71be6604b 100644 --- a/internal/client/securityprofiles/securityprofiles.go +++ b/internal/client/securityprofiles/securityprofiles.go @@ -18,6 +18,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "net/url" "os" @@ -27,9 +29,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - "internal/clilog" ) type secprofiles struct { diff --git a/internal/client/sharedflows/sharedflows.go b/internal/client/sharedflows/sharedflows.go index 43186c0a4..037c464ee 100644 --- a/internal/client/sharedflows/sharedflows.go +++ b/internal/client/sharedflows/sharedflows.go @@ -19,6 +19,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "mime/multipart" "net/http" @@ -29,10 +31,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - - "internal/clilog" ) type sharedflows struct { diff --git a/internal/client/sharedflows/sharedflows_test.go b/internal/client/sharedflows/sharedflows_test.go index a94efbf01..9f631f975 100644 --- a/internal/client/sharedflows/sharedflows_test.go +++ b/internal/client/sharedflows/sharedflows_test.go @@ -15,11 +15,10 @@ package sharedflows import ( + "internal/client/clienttest" "os" "path" "testing" - - "internal/client/clienttest" ) const ( diff --git a/internal/client/sites/sites.go b/internal/client/sites/sites.go index e7435163d..eac75f153 100644 --- a/internal/client/sites/sites.go +++ b/internal/client/sites/sites.go @@ -15,11 +15,10 @@ package sites import ( + "internal/apiclient" "net/url" "path" - "internal/apiclient" - "github.com/thedevsaddam/gojsonq" ) diff --git a/internal/client/sites/sites_test.go b/internal/client/sites/sites_test.go index 3a6db60e1..23e300171 100644 --- a/internal/client/sites/sites_test.go +++ b/internal/client/sites/sites_test.go @@ -15,9 +15,8 @@ package sites import ( - "testing" - "internal/client/clienttest" + "testing" ) func TestListSites(t *testing.T) { diff --git a/internal/client/sync/sync.go b/internal/client/sync/sync.go index ef1bd7b83..2074274eb 100644 --- a/internal/client/sync/sync.go +++ b/internal/client/sync/sync.go @@ -17,11 +17,10 @@ package sync import ( "encoding/json" "fmt" + "internal/apiclient" "net/url" "path" "strings" - - "internal/apiclient" ) type iAMIdentities struct { diff --git a/internal/client/targetservers/targetservers.go b/internal/client/targetservers/targetservers.go index 6814d94fa..907446da9 100644 --- a/internal/client/targetservers/targetservers.go +++ b/internal/client/targetservers/targetservers.go @@ -19,6 +19,8 @@ import ( "encoding/json" "errors" "fmt" + "internal/apiclient" + "internal/clilog" "io" "net/http" "net/url" @@ -27,10 +29,6 @@ import ( "strconv" "strings" "sync" - - "internal/apiclient" - - "internal/clilog" ) type targetserver struct { diff --git a/internal/client/targetservers/targetservers_test.go b/internal/client/targetservers/targetservers_test.go index b58725bbc..412ac1221 100644 --- a/internal/client/targetservers/targetservers_test.go +++ b/internal/client/targetservers/targetservers_test.go @@ -15,9 +15,8 @@ package targetservers import ( - "testing" - "internal/client/clienttest" + "testing" ) const name = "test" diff --git a/internal/cmd/apicategories/create.go b/internal/cmd/apicategories/create.go index 85fc8b298..99a52aeb3 100644 --- a/internal/cmd/apicategories/create.go +++ b/internal/cmd/apicategories/create.go @@ -16,9 +16,7 @@ package apicategories import ( "fmt" - "internal/apiclient" - "internal/client/apicategories" "github.com/spf13/cobra" diff --git a/internal/cmd/apicategories/delete.go b/internal/cmd/apicategories/delete.go index 9b7d30fd9..1a321427b 100644 --- a/internal/cmd/apicategories/delete.go +++ b/internal/cmd/apicategories/delete.go @@ -16,7 +16,6 @@ package apicategories import ( "fmt" - "internal/apiclient" "internal/client/apicategories" diff --git a/internal/cmd/apicategories/export.go b/internal/cmd/apicategories/export.go index 1615b6a15..edddd38c5 100644 --- a/internal/cmd/apicategories/export.go +++ b/internal/cmd/apicategories/export.go @@ -15,11 +15,9 @@ package apicategories import ( - "os" - "internal/apiclient" - "internal/client/apicategories" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apicategories/get.go b/internal/cmd/apicategories/get.go index d07afdbf6..11059adcd 100644 --- a/internal/cmd/apicategories/get.go +++ b/internal/cmd/apicategories/get.go @@ -16,9 +16,7 @@ package apicategories import ( "fmt" - "internal/apiclient" - "internal/client/apicategories" "github.com/spf13/cobra" diff --git a/internal/cmd/apicategories/import.go b/internal/cmd/apicategories/import.go index eb8a52213..99b04e0b2 100644 --- a/internal/cmd/apicategories/import.go +++ b/internal/cmd/apicategories/import.go @@ -16,9 +16,7 @@ package apicategories import ( "fmt" - "internal/apiclient" - "internal/client/apicategories" "github.com/spf13/cobra" diff --git a/internal/cmd/apicategories/list.go b/internal/cmd/apicategories/list.go index 04795255a..c4ed4025d 100644 --- a/internal/cmd/apicategories/list.go +++ b/internal/cmd/apicategories/list.go @@ -16,7 +16,6 @@ package apicategories import ( "fmt" - "internal/apiclient" "internal/client/apicategories" diff --git a/internal/cmd/apidocs/create.go b/internal/cmd/apidocs/create.go index a695af98c..030e6d839 100644 --- a/internal/cmd/apidocs/create.go +++ b/internal/cmd/apidocs/create.go @@ -16,10 +16,9 @@ package apidocs import ( "fmt" - "strconv" - "internal/apiclient" "internal/client/apidocs" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apidocs/delete.go b/internal/cmd/apidocs/delete.go index 9596d56e1..0354e87a0 100644 --- a/internal/cmd/apidocs/delete.go +++ b/internal/cmd/apidocs/delete.go @@ -16,7 +16,6 @@ package apidocs import ( "fmt" - "internal/apiclient" "internal/client/apidocs" diff --git a/internal/cmd/apidocs/export.go b/internal/cmd/apidocs/export.go index d1a6837d0..3377e3210 100644 --- a/internal/cmd/apidocs/export.go +++ b/internal/cmd/apidocs/export.go @@ -15,11 +15,9 @@ package apidocs import ( - "os" - "internal/apiclient" - "internal/client/apidocs" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apidocs/get.go b/internal/cmd/apidocs/get.go index a805f06a6..d1d453fc9 100644 --- a/internal/cmd/apidocs/get.go +++ b/internal/cmd/apidocs/get.go @@ -16,7 +16,6 @@ package apidocs import ( "fmt" - "internal/apiclient" "internal/client/apidocs" diff --git a/internal/cmd/apidocs/getdocs.go b/internal/cmd/apidocs/getdocs.go index e37a1128d..c32826777 100644 --- a/internal/cmd/apidocs/getdocs.go +++ b/internal/cmd/apidocs/getdocs.go @@ -16,7 +16,6 @@ package apidocs import ( "fmt" - "internal/apiclient" "internal/client/apidocs" diff --git a/internal/cmd/apidocs/import.go b/internal/cmd/apidocs/import.go index cdfef839c..f8228f523 100644 --- a/internal/cmd/apidocs/import.go +++ b/internal/cmd/apidocs/import.go @@ -16,9 +16,7 @@ package apidocs import ( "fmt" - "internal/apiclient" - "internal/client/apidocs" "github.com/spf13/cobra" diff --git a/internal/cmd/apidocs/list.go b/internal/cmd/apidocs/list.go index 592f90969..a740eb31c 100644 --- a/internal/cmd/apidocs/list.go +++ b/internal/cmd/apidocs/list.go @@ -16,7 +16,6 @@ package apidocs import ( "fmt" - "internal/apiclient" "internal/client/apidocs" diff --git a/internal/cmd/apidocs/update.go b/internal/cmd/apidocs/update.go index f5fc718cc..de73cccae 100644 --- a/internal/cmd/apidocs/update.go +++ b/internal/cmd/apidocs/update.go @@ -16,10 +16,9 @@ package apidocs import ( "fmt" - "strconv" - "internal/apiclient" "internal/client/apidocs" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apidocs/updatedocs.go b/internal/cmd/apidocs/updatedocs.go index 6c7bbe762..8ee687c2a 100644 --- a/internal/cmd/apidocs/updatedocs.go +++ b/internal/cmd/apidocs/updatedocs.go @@ -16,10 +16,8 @@ package apidocs import ( "fmt" - "internal/apiclient" "internal/client/apidocs" - "internal/cmd/utils" "github.com/spf13/cobra" diff --git a/internal/cmd/apihub/apis/create.go b/internal/cmd/apihub/apis/create.go index eb4b2fdee..5d64e0cdc 100644 --- a/internal/cmd/apihub/apis/create.go +++ b/internal/cmd/apihub/apis/create.go @@ -15,10 +15,9 @@ package apis import ( - "os" - "internal/apiclient" "internal/client/hub" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/apis/export.go b/internal/cmd/apihub/apis/export.go index 1015b06d0..a80bb8e01 100644 --- a/internal/cmd/apihub/apis/export.go +++ b/internal/cmd/apihub/apis/export.go @@ -15,10 +15,9 @@ package apis import ( - "os" - "internal/apiclient" "internal/client/hub" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/apis/update.go b/internal/cmd/apihub/apis/update.go index 1f30c0887..8d4fc98aa 100644 --- a/internal/cmd/apihub/apis/update.go +++ b/internal/cmd/apihub/apis/update.go @@ -15,10 +15,9 @@ package apis import ( - "os" - "internal/apiclient" "internal/client/hub" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/apis/versions/create.go b/internal/cmd/apihub/apis/versions/create.go index e6d9e7185..97c0b143e 100644 --- a/internal/cmd/apihub/apis/versions/create.go +++ b/internal/cmd/apihub/apis/versions/create.go @@ -15,10 +15,9 @@ package versions import ( - "os" - "internal/apiclient" "internal/client/hub" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/apis/versions/specs/create.go b/internal/cmd/apihub/apis/versions/specs/create.go index 941a4c290..903fe6172 100644 --- a/internal/cmd/apihub/apis/versions/specs/create.go +++ b/internal/cmd/apihub/apis/versions/specs/create.go @@ -15,11 +15,10 @@ package specs import ( - "path/filepath" - "internal/apiclient" "internal/client/hub" "internal/cmd/utils" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/apis/versions/specs/get.go b/internal/cmd/apihub/apis/versions/specs/get.go index a1337b2f7..9ee6fdb6a 100644 --- a/internal/cmd/apihub/apis/versions/specs/get.go +++ b/internal/cmd/apihub/apis/versions/specs/get.go @@ -74,8 +74,10 @@ var GetCmd = &cobra.Command{ }, } -var fileContentPath string -var contents bool +var ( + fileContentPath string + contents bool +) func init() { GetCmd.Flags().StringVarP(&versionID, "version", "v", diff --git a/internal/cmd/apihub/apis/versions/specs/update.go b/internal/cmd/apihub/apis/versions/specs/update.go index 7870c052e..0df48a03d 100644 --- a/internal/cmd/apihub/apis/versions/specs/update.go +++ b/internal/cmd/apihub/apis/versions/specs/update.go @@ -15,11 +15,10 @@ package specs import ( - "path/filepath" - "internal/apiclient" "internal/client/hub" "internal/cmd/utils" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/apis/versions/update.go b/internal/cmd/apihub/apis/versions/update.go index f97bb69e2..f961f34ee 100644 --- a/internal/cmd/apihub/apis/versions/update.go +++ b/internal/cmd/apihub/apis/versions/update.go @@ -15,10 +15,9 @@ package versions import ( - "os" - "internal/apiclient" "internal/client/hub" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/attributes/create.go b/internal/cmd/apihub/attributes/create.go index 0eeba1112..cf269772f 100644 --- a/internal/cmd/apihub/attributes/create.go +++ b/internal/cmd/apihub/attributes/create.go @@ -15,10 +15,9 @@ package attributes import ( - "os" - "internal/apiclient" "internal/client/hub" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/attributes/get.go b/internal/cmd/apihub/attributes/get.go index 8364f9f5a..188fff6aa 100644 --- a/internal/cmd/apihub/attributes/get.go +++ b/internal/cmd/apihub/attributes/get.go @@ -16,7 +16,6 @@ package attributes import ( "fmt" - "internal/apiclient" "internal/client/hub" diff --git a/internal/cmd/apihub/dependencies/create.go b/internal/cmd/apihub/dependencies/create.go index 69c828278..24dc31093 100644 --- a/internal/cmd/apihub/dependencies/create.go +++ b/internal/cmd/apihub/dependencies/create.go @@ -16,10 +16,9 @@ package dependencies import ( "fmt" - "regexp" - "internal/apiclient" "internal/client/hub" + "regexp" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apihub/deployments/update.go b/internal/cmd/apihub/deployments/update.go index d8059cc73..fc794b21b 100644 --- a/internal/cmd/apihub/deployments/update.go +++ b/internal/cmd/apihub/deployments/update.go @@ -53,5 +53,4 @@ func init() { UpdateCmd.Flags().Var(&d, "dep-type", "The type of deployment") UpdateCmd.Flags().Var(&e, "env-type", "The environment mapping to this deployment") UpdateCmd.Flags().Var(&s, "slo-type", "The SLO for this deployment") - } diff --git a/internal/cmd/apihub/instances/create.go b/internal/cmd/apihub/instances/create.go index 0453e47ad..2243b8aa3 100644 --- a/internal/cmd/apihub/instances/create.go +++ b/internal/cmd/apihub/instances/create.go @@ -16,10 +16,9 @@ package instances import ( "fmt" - "regexp" - "internal/apiclient" "internal/client/hub" + "regexp" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apis/bundlecrtapis.go b/internal/cmd/apis/bundlecrtapis.go index 037a15efd..ee86c7ab9 100644 --- a/internal/cmd/apis/bundlecrtapis.go +++ b/internal/cmd/apis/bundlecrtapis.go @@ -16,17 +16,15 @@ package apis import ( "fmt" + "internal/apiclient" + "internal/client/apis" + "internal/clilog" "os" "path" "path/filepath" - "internal/apiclient" - "internal/clilog" - proxybundle "internal/bundlegen/proxybundle" - "internal/client/apis" - cp "github.com/otiai10/copy" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/cleanapi.go b/internal/cmd/apis/cleanapi.go index cf2d2db25..26d85ca52 100644 --- a/internal/cmd/apis/cleanapi.go +++ b/internal/cmd/apis/cleanapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/cloneapi.go b/internal/cmd/apis/cloneapi.go index 16327ec39..332d73a21 100644 --- a/internal/cmd/apis/cloneapi.go +++ b/internal/cmd/apis/cloneapi.go @@ -17,6 +17,8 @@ package apis import ( "archive/zip" "fmt" + "internal/apiclient" + "internal/client/apis" "io" "os" "os/exec" @@ -26,9 +28,6 @@ import ( "runtime" "strings" - "internal/apiclient" - "internal/client/apis" - proxybundle "internal/bundlegen/proxybundle" "github.com/spf13/cobra" @@ -163,7 +162,6 @@ func renameProxy(tmpDir string) (err error) { } return nil }) - if err != nil { return err } diff --git a/internal/cmd/apis/crtapikvm.go b/internal/cmd/apis/crtapikvm.go index 41e17550b..12706016b 100644 --- a/internal/cmd/apis/crtapikvm.go +++ b/internal/cmd/apis/crtapikvm.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/crttrcapi.go b/internal/cmd/apis/crttrcapi.go index a0fde5860..531e2881e 100644 --- a/internal/cmd/apis/crttrcapi.go +++ b/internal/cmd/apis/crttrcapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/delapi.go b/internal/cmd/apis/delapi.go index bdf0a95ec..6423febe0 100644 --- a/internal/cmd/apis/delapi.go +++ b/internal/cmd/apis/delapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/delapikvm.go b/internal/cmd/apis/delapikvm.go index 550a61729..7975cd982 100644 --- a/internal/cmd/apis/delapikvm.go +++ b/internal/cmd/apis/delapikvm.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/depapi.go b/internal/cmd/apis/depapi.go index 87bac43a2..a45e8b56c 100644 --- a/internal/cmd/apis/depapi.go +++ b/internal/cmd/apis/depapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/expapis.go b/internal/cmd/apis/expapis.go index 279c6e610..b7f852713 100644 --- a/internal/cmd/apis/expapis.go +++ b/internal/cmd/apis/expapis.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/fetchapi.go b/internal/cmd/apis/fetchapi.go index 6df4c516b..5e72933c2 100644 --- a/internal/cmd/apis/fetchapi.go +++ b/internal/cmd/apis/fetchapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/getapi.go b/internal/cmd/apis/getapi.go index 32dbdf07b..ca610bf78 100644 --- a/internal/cmd/apis/getapi.go +++ b/internal/cmd/apis/getapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/gettrcapi.go b/internal/cmd/apis/gettrcapi.go index dfdd26ec5..bc050133d 100644 --- a/internal/cmd/apis/gettrcapi.go +++ b/internal/cmd/apis/gettrcapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/ghcrtapis.go b/internal/cmd/apis/ghcrtapis.go index daf6e905b..b2a12e631 100644 --- a/internal/cmd/apis/ghcrtapis.go +++ b/internal/cmd/apis/ghcrtapis.go @@ -16,17 +16,14 @@ package apis import ( "fmt" - "os" - "regexp" - "internal/apiclient" - + "internal/client/apis" "internal/clilog" + "os" + "regexp" proxybundle "internal/bundlegen/proxybundle" - "internal/client/apis" - "github.com/spf13/cobra" ) diff --git a/internal/cmd/apis/gqlcrtapis.go b/internal/cmd/apis/gqlcrtapis.go index 98c5a4efc..698f11fd2 100644 --- a/internal/cmd/apis/gqlcrtapis.go +++ b/internal/cmd/apis/gqlcrtapis.go @@ -16,6 +16,9 @@ package apis import ( "fmt" + "internal/apiclient" + "internal/client/apis" + "internal/clilog" "io" "net/url" "os" @@ -23,15 +26,9 @@ import ( "path/filepath" "strings" - "internal/apiclient" - - "internal/clilog" - bundle "internal/bundlegen" proxybundle "internal/bundlegen/proxybundle" - "internal/client/apis" - "github.com/spf13/cobra" ) @@ -81,7 +78,6 @@ var GqlCreateCmd = &cobra.Command{ addCORS, targetURLRef, targetURL) - if err != nil { return err } @@ -97,7 +93,6 @@ var GqlCreateCmd = &cobra.Command{ addCORS, targetURLRef, targetURL) - if err != nil { return err } diff --git a/internal/cmd/apis/impapis.go b/internal/cmd/apis/impapis.go index 16cba74ff..1e33e5a64 100644 --- a/internal/cmd/apis/impapis.go +++ b/internal/cmd/apis/impapis.go @@ -16,11 +16,9 @@ package apis import ( "fmt" - "os" - "internal/apiclient" - "internal/client/apis" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apis/integrationapis.go b/internal/cmd/apis/integrationapis.go index 802c7b82c..7a6735257 100644 --- a/internal/cmd/apis/integrationapis.go +++ b/internal/cmd/apis/integrationapis.go @@ -15,13 +15,11 @@ package apis import ( - "os" - "internal/apiclient" - "internal/client/apis" - "internal/bundlegen" "internal/bundlegen/proxybundle" + "internal/client/apis" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apis/listapikvm.go b/internal/cmd/apis/listapikvm.go index 867ee09cc..05bf8218f 100644 --- a/internal/cmd/apis/listapikvm.go +++ b/internal/cmd/apis/listapikvm.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/listapis.go b/internal/cmd/apis/listapis.go index 4d5648e31..772b03e53 100644 --- a/internal/cmd/apis/listapis.go +++ b/internal/cmd/apis/listapis.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/listdeploy.go b/internal/cmd/apis/listdeploy.go index d730c8d5c..45bac2ae3 100644 --- a/internal/cmd/apis/listdeploy.go +++ b/internal/cmd/apis/listdeploy.go @@ -16,9 +16,7 @@ package apis import ( "fmt" - "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/listtrcapi.go b/internal/cmd/apis/listtrcapi.go index a54cc839c..b51cd354b 100644 --- a/internal/cmd/apis/listtrcapi.go +++ b/internal/cmd/apis/listtrcapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/oascrtapisv2.go b/internal/cmd/apis/oascrtapisv2.go index 57f1f4e25..15763c3e2 100644 --- a/internal/cmd/apis/oascrtapisv2.go +++ b/internal/cmd/apis/oascrtapisv2.go @@ -16,17 +16,15 @@ package apis import ( "fmt" - "os" - "regexp" - "internal/apiclient" + "internal/client/apis" "internal/clilog" + "os" + "regexp" bundle "internal/bundlegen" proxybundle "internal/bundlegen/proxybundle" - "internal/client/apis" - "github.com/spf13/cobra" ) @@ -115,7 +113,6 @@ Create an API Proxy from OAS and deploy the proxy to an environment: skipPolicy, addCORS, targetOptions) - if err != nil { return err } @@ -127,7 +124,6 @@ Create an API Proxy from OAS and deploy the proxy to an environment: skipPolicy, addCORS, targetOptions) - if err != nil { return err } diff --git a/internal/cmd/apis/swaggerapis.go b/internal/cmd/apis/swaggerapis.go index 1a3885d70..6291a6851 100644 --- a/internal/cmd/apis/swaggerapis.go +++ b/internal/cmd/apis/swaggerapis.go @@ -16,14 +16,12 @@ package apis import ( "fmt" - "internal/apiclient" + "internal/client/apis" bundle "internal/bundlegen" proxybundle "internal/bundlegen/proxybundle" - "internal/client/apis" - "github.com/spf13/cobra" ) @@ -62,7 +60,6 @@ var SwaggerCreateCmd = &cobra.Command{ oasDocName, basePath, addCORS) - if err != nil { return err } diff --git a/internal/cmd/apis/undepapi.go b/internal/cmd/apis/undepapi.go index e30f8bb3a..ce7206061 100644 --- a/internal/cmd/apis/undepapi.go +++ b/internal/cmd/apis/undepapi.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/apis/updapis.go b/internal/cmd/apis/updapis.go index 849ffdc32..62671cd43 100644 --- a/internal/cmd/apis/updapis.go +++ b/internal/cmd/apis/updapis.go @@ -16,7 +16,6 @@ package apis import ( "internal/apiclient" - "internal/client/apis" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/createkey.go b/internal/cmd/appgroups/createkey.go index bb04b4ca6..f07f85768 100644 --- a/internal/cmd/appgroups/createkey.go +++ b/internal/cmd/appgroups/createkey.go @@ -16,10 +16,9 @@ package appgroups import ( "fmt" - "strconv" - "internal/apiclient" "internal/client/appgroups" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/appgroups/crtapp.go b/internal/cmd/appgroups/crtapp.go index ac680b234..ab931ed7b 100644 --- a/internal/cmd/appgroups/crtapp.go +++ b/internal/cmd/appgroups/crtapp.go @@ -16,11 +16,9 @@ package appgroups import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/appgroups" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/appgroups/delkey.go b/internal/cmd/appgroups/delkey.go index 2a26ca67d..d39b1dbfa 100644 --- a/internal/cmd/appgroups/delkey.go +++ b/internal/cmd/appgroups/delkey.go @@ -16,7 +16,6 @@ package appgroups import ( "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/delkeyprod.go b/internal/cmd/appgroups/delkeyprod.go index a97fcdaac..0eb14f9bb 100644 --- a/internal/cmd/appgroups/delkeyprod.go +++ b/internal/cmd/appgroups/delkeyprod.go @@ -16,7 +16,6 @@ package appgroups import ( "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/expappgroups.go b/internal/cmd/appgroups/expappgroups.go index 9ce79227f..5555b8f97 100644 --- a/internal/cmd/appgroups/expappgroups.go +++ b/internal/cmd/appgroups/expappgroups.go @@ -16,7 +16,6 @@ package appgroups import ( "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/expapps.go b/internal/cmd/appgroups/expapps.go index 49f3dda73..7e3130c81 100644 --- a/internal/cmd/appgroups/expapps.go +++ b/internal/cmd/appgroups/expapps.go @@ -16,12 +16,9 @@ package appgroups import ( "fmt" - - "internal/cmd/utils" - "internal/apiclient" - "internal/client/appgroups" + "internal/cmd/utils" "github.com/spf13/cobra" ) diff --git a/internal/cmd/appgroups/getkey.go b/internal/cmd/appgroups/getkey.go index 82c446585..9d6ec01ca 100644 --- a/internal/cmd/appgroups/getkey.go +++ b/internal/cmd/appgroups/getkey.go @@ -16,7 +16,6 @@ package appgroups import ( "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/impappgroup.go b/internal/cmd/appgroups/impappgroup.go index 061bb4638..bf0c5ce48 100644 --- a/internal/cmd/appgroups/impappgroup.go +++ b/internal/cmd/appgroups/impappgroup.go @@ -16,7 +16,6 @@ package appgroups import ( "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/impapps.go b/internal/cmd/appgroups/impapps.go index 7267cd133..5300551f0 100644 --- a/internal/cmd/appgroups/impapps.go +++ b/internal/cmd/appgroups/impapps.go @@ -16,9 +16,7 @@ package appgroups import ( "fmt" - "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/listappgroups.go b/internal/cmd/appgroups/listappgroups.go index 9541c8111..715b550e3 100644 --- a/internal/cmd/appgroups/listappgroups.go +++ b/internal/cmd/appgroups/listappgroups.go @@ -16,7 +16,6 @@ package appgroups import ( "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/listapps.go b/internal/cmd/appgroups/listapps.go index 392144f32..124385cd0 100644 --- a/internal/cmd/appgroups/listapps.go +++ b/internal/cmd/appgroups/listapps.go @@ -16,7 +16,6 @@ package appgroups import ( "internal/apiclient" - "internal/client/appgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/appgroups/updateapp.go b/internal/cmd/appgroups/updateapp.go index d696f5da1..0d566d49a 100644 --- a/internal/cmd/appgroups/updateapp.go +++ b/internal/cmd/appgroups/updateapp.go @@ -16,11 +16,9 @@ package appgroups import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/appgroups" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apps/createkey.go b/internal/cmd/apps/createkey.go index 8b5d7eee7..709c397a9 100644 --- a/internal/cmd/apps/createkey.go +++ b/internal/cmd/apps/createkey.go @@ -16,11 +16,9 @@ package apps import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/apps" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apps/crtapp.go b/internal/cmd/apps/crtapp.go index 1b14ffda6..b36e5f245 100644 --- a/internal/cmd/apps/crtapp.go +++ b/internal/cmd/apps/crtapp.go @@ -16,11 +16,9 @@ package apps import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/apps" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apps/delapp.go b/internal/cmd/apps/delapp.go index a339980f3..90aca11f4 100644 --- a/internal/cmd/apps/delapp.go +++ b/internal/cmd/apps/delapp.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/deletekey.go b/internal/cmd/apps/deletekey.go index c34bf2e9a..9e4a742d1 100644 --- a/internal/cmd/apps/deletekey.go +++ b/internal/cmd/apps/deletekey.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/expapp.go b/internal/cmd/apps/expapp.go index 8623bdef8..ceec8323e 100644 --- a/internal/cmd/apps/expapp.go +++ b/internal/cmd/apps/expapp.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/genkey.go b/internal/cmd/apps/genkey.go index 2933eb445..c0236fc7c 100644 --- a/internal/cmd/apps/genkey.go +++ b/internal/cmd/apps/genkey.go @@ -16,11 +16,9 @@ package apps import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/apps" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apps/getapp.go b/internal/cmd/apps/getapp.go index 86f043384..9c6b14c97 100644 --- a/internal/cmd/apps/getapp.go +++ b/internal/cmd/apps/getapp.go @@ -16,9 +16,7 @@ package apps import ( "fmt" - "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/getkey.go b/internal/cmd/apps/getkey.go index b37d3ca9c..e429654e3 100644 --- a/internal/cmd/apps/getkey.go +++ b/internal/cmd/apps/getkey.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/impapps.go b/internal/cmd/apps/impapps.go index 572c1f726..7a861fd6b 100644 --- a/internal/cmd/apps/impapps.go +++ b/internal/cmd/apps/impapps.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/listapp.go b/internal/cmd/apps/listapp.go index 97b764908..bad7c581f 100644 --- a/internal/cmd/apps/listapp.go +++ b/internal/cmd/apps/listapp.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/manageapp.go b/internal/cmd/apps/manageapp.go index a9143ca0f..d57095adc 100644 --- a/internal/cmd/apps/manageapp.go +++ b/internal/cmd/apps/manageapp.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/managekey.go b/internal/cmd/apps/managekey.go index 0853ed363..7c40a8264 100644 --- a/internal/cmd/apps/managekey.go +++ b/internal/cmd/apps/managekey.go @@ -16,7 +16,6 @@ package apps import ( "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/apps/updateapp.go b/internal/cmd/apps/updateapp.go index f57f5b0b8..f0bf949af 100644 --- a/internal/cmd/apps/updateapp.go +++ b/internal/cmd/apps/updateapp.go @@ -16,11 +16,9 @@ package apps import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/apps" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/apps/updatekey.go b/internal/cmd/apps/updatekey.go index 8dbfc8ee7..a2f308048 100644 --- a/internal/cmd/apps/updatekey.go +++ b/internal/cmd/apps/updatekey.go @@ -16,9 +16,7 @@ package apps import ( "fmt" - "internal/apiclient" - "internal/client/apps" "github.com/spf13/cobra" diff --git a/internal/cmd/cache/delcache.go b/internal/cmd/cache/delcache.go index f6c7e103f..053c02da2 100644 --- a/internal/cmd/cache/delcache.go +++ b/internal/cmd/cache/delcache.go @@ -16,7 +16,6 @@ package cache import ( "internal/apiclient" - "internal/client/cache" "github.com/spf13/cobra" diff --git a/internal/cmd/cache/listcache.go b/internal/cmd/cache/listcache.go index 8ace341aa..44558d522 100644 --- a/internal/cmd/cache/listcache.go +++ b/internal/cmd/cache/listcache.go @@ -16,7 +16,6 @@ package cache import ( "internal/apiclient" - "internal/client/cache" "github.com/spf13/cobra" diff --git a/internal/cmd/datacollectors/crtdatacollector.go b/internal/cmd/datacollectors/crtdatacollector.go index 22ea3e7e7..006c7ab91 100644 --- a/internal/cmd/datacollectors/crtdatacollector.go +++ b/internal/cmd/datacollectors/crtdatacollector.go @@ -16,9 +16,7 @@ package datacollectors import ( "fmt" - "internal/apiclient" - "internal/client/datacollectors" "github.com/spf13/cobra" diff --git a/internal/cmd/datacollectors/deldatacollector.go b/internal/cmd/datacollectors/deldatacollector.go index 5d60a1b2b..8d85ad714 100644 --- a/internal/cmd/datacollectors/deldatacollector.go +++ b/internal/cmd/datacollectors/deldatacollector.go @@ -16,7 +16,6 @@ package datacollectors import ( "internal/apiclient" - "internal/client/datacollectors" "github.com/spf13/cobra" diff --git a/internal/cmd/datacollectors/expdatacollector.go b/internal/cmd/datacollectors/expdatacollector.go index 015c9d08e..23c4945a3 100644 --- a/internal/cmd/datacollectors/expdatacollector.go +++ b/internal/cmd/datacollectors/expdatacollector.go @@ -16,7 +16,6 @@ package datacollectors import ( "internal/apiclient" - "internal/client/datacollectors" "github.com/spf13/cobra" diff --git a/internal/cmd/datacollectors/getdatacollector.go b/internal/cmd/datacollectors/getdatacollector.go index 7e1e140ed..7fe31b900 100644 --- a/internal/cmd/datacollectors/getdatacollector.go +++ b/internal/cmd/datacollectors/getdatacollector.go @@ -16,7 +16,6 @@ package datacollectors import ( "internal/apiclient" - "internal/client/datacollectors" "github.com/spf13/cobra" diff --git a/internal/cmd/datacollectors/impdatacolletcor.go b/internal/cmd/datacollectors/impdatacolletcor.go index ad8167e48..a82671a79 100644 --- a/internal/cmd/datacollectors/impdatacolletcor.go +++ b/internal/cmd/datacollectors/impdatacolletcor.go @@ -16,7 +16,6 @@ package datacollectors import ( "internal/apiclient" - "internal/client/datacollectors" "github.com/spf13/cobra" diff --git a/internal/cmd/datacollectors/listdatacollector.go b/internal/cmd/datacollectors/listdatacollector.go index 7699ab2f4..880a00aef 100644 --- a/internal/cmd/datacollectors/listdatacollector.go +++ b/internal/cmd/datacollectors/listdatacollector.go @@ -16,7 +16,6 @@ package datacollectors import ( "internal/apiclient" - "internal/client/datacollectors" "github.com/spf13/cobra" diff --git a/internal/cmd/datastores/delete.go b/internal/cmd/datastores/delete.go index ef31d8e0c..c37b370fd 100644 --- a/internal/cmd/datastores/delete.go +++ b/internal/cmd/datastores/delete.go @@ -16,7 +16,6 @@ package datastores import ( "fmt" - "internal/apiclient" "internal/client/datastores" diff --git a/internal/cmd/datastores/get.go b/internal/cmd/datastores/get.go index 66a066a59..616c4a567 100644 --- a/internal/cmd/datastores/get.go +++ b/internal/cmd/datastores/get.go @@ -16,7 +16,6 @@ package datastores import ( "fmt" - "internal/apiclient" "internal/client/datastores" diff --git a/internal/cmd/developers/adjust.go b/internal/cmd/developers/adjust.go index 41d373e2f..4593890f9 100644 --- a/internal/cmd/developers/adjust.go +++ b/internal/cmd/developers/adjust.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/credit.go b/internal/cmd/developers/credit.go index 945776b12..73f051b0e 100644 --- a/internal/cmd/developers/credit.go +++ b/internal/cmd/developers/credit.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/crtdev.go b/internal/cmd/developers/crtdev.go index cb014018b..857b2ed42 100644 --- a/internal/cmd/developers/crtdev.go +++ b/internal/cmd/developers/crtdev.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/crtsub.go b/internal/cmd/developers/crtsub.go index 90da38de8..ab8703afd 100644 --- a/internal/cmd/developers/crtsub.go +++ b/internal/cmd/developers/crtsub.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/deldev.go b/internal/cmd/developers/deldev.go index 494cfb099..6734da99d 100644 --- a/internal/cmd/developers/deldev.go +++ b/internal/cmd/developers/deldev.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/expdev.go b/internal/cmd/developers/expdev.go index 6681506b2..664e2ef6a 100644 --- a/internal/cmd/developers/expdev.go +++ b/internal/cmd/developers/expdev.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/expiresub.go b/internal/cmd/developers/expiresub.go index 995226f02..b8952282c 100644 --- a/internal/cmd/developers/expiresub.go +++ b/internal/cmd/developers/expiresub.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/expsub.go b/internal/cmd/developers/expsub.go index fc9fe1d98..bfad6c695 100644 --- a/internal/cmd/developers/expsub.go +++ b/internal/cmd/developers/expsub.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/getdev.go b/internal/cmd/developers/getdev.go index 94407ba35..5d6c2108c 100644 --- a/internal/cmd/developers/getdev.go +++ b/internal/cmd/developers/getdev.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/getdevapps.go b/internal/cmd/developers/getdevapps.go index 9b1f56558..342c374db 100644 --- a/internal/cmd/developers/getdevapps.go +++ b/internal/cmd/developers/getdevapps.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/getsub.go b/internal/cmd/developers/getsub.go index 13638e79f..43493ad19 100644 --- a/internal/cmd/developers/getsub.go +++ b/internal/cmd/developers/getsub.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/impdev.go b/internal/cmd/developers/impdev.go index 503f6c7fa..2348dd0a7 100644 --- a/internal/cmd/developers/impdev.go +++ b/internal/cmd/developers/impdev.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/listdev.go b/internal/cmd/developers/listdev.go index 7b86d6cc8..2c2bad198 100644 --- a/internal/cmd/developers/listdev.go +++ b/internal/cmd/developers/listdev.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/listsub.go b/internal/cmd/developers/listsub.go index 8b9b4cafe..66b5d54d6 100644 --- a/internal/cmd/developers/listsub.go +++ b/internal/cmd/developers/listsub.go @@ -16,7 +16,6 @@ package developers import ( "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/developers/upddev.go b/internal/cmd/developers/upddev.go index 061f109f5..9a195bc10 100644 --- a/internal/cmd/developers/upddev.go +++ b/internal/cmd/developers/upddev.go @@ -16,9 +16,7 @@ package developers import ( "fmt" - "internal/apiclient" - "internal/client/developers" "github.com/spf13/cobra" diff --git a/internal/cmd/env/crtarchive.go b/internal/cmd/env/crtarchive.go index 00ff40e83..5de721418 100644 --- a/internal/cmd/env/crtarchive.go +++ b/internal/cmd/env/crtarchive.go @@ -17,16 +17,13 @@ package env import ( "encoding/json" "fmt" - "strings" - "time" - "internal/apiclient" - "internal/clilog" - "internal/bundlegen/proxybundle" - "internal/client/env" "internal/client/operations" + "internal/clilog" + "strings" + "time" "github.com/spf13/cobra" ) diff --git a/internal/cmd/env/crtenv.go b/internal/cmd/env/crtenv.go index 855a04481..561de41f3 100644 --- a/internal/cmd/env/crtenv.go +++ b/internal/cmd/env/crtenv.go @@ -17,13 +17,11 @@ package env import ( "encoding/json" "fmt" - "net/url" - "path/filepath" - "internal/apiclient" - "internal/client/env" "internal/client/operations" + "net/url" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/env/crtsecactions.go b/internal/cmd/env/crtsecactions.go index 5f4346a2a..3f7d73ab5 100644 --- a/internal/cmd/env/crtsecactions.go +++ b/internal/cmd/env/crtsecactions.go @@ -17,7 +17,6 @@ package env import ( "internal/apiclient" "internal/client/env" - "internal/cmd/utils" "github.com/spf13/cobra" diff --git a/internal/cmd/env/delarchive.go b/internal/cmd/env/delarchive.go index 3692bb293..c035be4ec 100644 --- a/internal/cmd/env/delarchive.go +++ b/internal/cmd/env/delarchive.go @@ -16,7 +16,6 @@ package env import ( "internal/apiclient" - "internal/client/env" "github.com/spf13/cobra" diff --git a/internal/cmd/env/delenv.go b/internal/cmd/env/delenv.go index 9906b35ad..becfa3fee 100644 --- a/internal/cmd/env/delenv.go +++ b/internal/cmd/env/delenv.go @@ -17,10 +17,9 @@ package env import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/env" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/env/enableaxob.go b/internal/cmd/env/enableaxob.go index 81e19c55b..2f25ccd1b 100644 --- a/internal/cmd/env/enableaxob.go +++ b/internal/cmd/env/enableaxob.go @@ -15,11 +15,9 @@ package env import ( - "strconv" - "internal/apiclient" - "internal/client/env" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/env/expenv.go b/internal/cmd/env/expenv.go index 444bd7913..d59d79139 100644 --- a/internal/cmd/env/expenv.go +++ b/internal/cmd/env/expenv.go @@ -16,7 +16,6 @@ package env import ( "internal/apiclient" - "internal/client/env" "github.com/spf13/cobra" diff --git a/internal/cmd/env/getarchive.go b/internal/cmd/env/getarchive.go index 271ca0ddd..d1c2b774e 100644 --- a/internal/cmd/env/getarchive.go +++ b/internal/cmd/env/getarchive.go @@ -16,7 +16,6 @@ package env import ( "internal/apiclient" - "internal/client/env" "github.com/spf13/cobra" diff --git a/internal/cmd/env/getenv.go b/internal/cmd/env/getenv.go index ab70d65e2..485af3fc0 100644 --- a/internal/cmd/env/getenv.go +++ b/internal/cmd/env/getenv.go @@ -16,7 +16,6 @@ package env import ( "internal/apiclient" - "internal/client/env" "github.com/spf13/cobra" diff --git a/internal/cmd/env/listarchives.go b/internal/cmd/env/listarchives.go index 0054f1b02..2e496c272 100644 --- a/internal/cmd/env/listarchives.go +++ b/internal/cmd/env/listarchives.go @@ -16,7 +16,6 @@ package env import ( "internal/apiclient" - "internal/client/env" "github.com/spf13/cobra" diff --git a/internal/cmd/env/listenv.go b/internal/cmd/env/listenv.go index e98a31254..b3d3e3d62 100644 --- a/internal/cmd/env/listenv.go +++ b/internal/cmd/env/listenv.go @@ -16,7 +16,6 @@ package env import ( "internal/apiclient" - "internal/client/env" "github.com/spf13/cobra" diff --git a/internal/cmd/env/setax.go b/internal/cmd/env/setax.go index f6ad54e45..1602b28f5 100644 --- a/internal/cmd/env/setax.go +++ b/internal/cmd/env/setax.go @@ -16,7 +16,6 @@ package env import ( "fmt" - "internal/apiclient" "internal/clilog" diff --git a/internal/cmd/env/setcustom.go b/internal/cmd/env/setcustom.go index a111abc50..02d05b167 100644 --- a/internal/cmd/env/setcustom.go +++ b/internal/cmd/env/setcustom.go @@ -16,10 +16,9 @@ package env import ( "fmt" - "regexp" - "internal/apiclient" "internal/clilog" + "regexp" environments "internal/client/env" diff --git a/internal/cmd/env/setprop.go b/internal/cmd/env/setprop.go index 8115a36b8..1040ba3dd 100644 --- a/internal/cmd/env/setprop.go +++ b/internal/cmd/env/setprop.go @@ -16,7 +16,6 @@ package env import ( "internal/apiclient" - "internal/client/env" "github.com/spf13/cobra" diff --git a/internal/cmd/envgroup/attachenv.go b/internal/cmd/envgroup/attachenv.go index 360817cfd..b512ac446 100644 --- a/internal/cmd/envgroup/attachenv.go +++ b/internal/cmd/envgroup/attachenv.go @@ -17,10 +17,9 @@ package envgroup import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/envgroups" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/envgroup/crtenvgroup.go b/internal/cmd/envgroup/crtenvgroup.go index e24c71afb..ccbe27e9b 100644 --- a/internal/cmd/envgroup/crtenvgroup.go +++ b/internal/cmd/envgroup/crtenvgroup.go @@ -17,10 +17,9 @@ package envgroup import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/envgroups" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/envgroup/delenvgroup.go b/internal/cmd/envgroup/delenvgroup.go index 2d45d67a4..8d5ae8d3f 100644 --- a/internal/cmd/envgroup/delenvgroup.go +++ b/internal/cmd/envgroup/delenvgroup.go @@ -17,10 +17,9 @@ package envgroup import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/envgroups" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/envgroup/detachenv.go b/internal/cmd/envgroup/detachenv.go index bad1fc213..3907dd6ef 100644 --- a/internal/cmd/envgroup/detachenv.go +++ b/internal/cmd/envgroup/detachenv.go @@ -16,7 +16,6 @@ package envgroup import ( "internal/apiclient" - "internal/client/envgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/envgroup/getenvgroup.go b/internal/cmd/envgroup/getenvgroup.go index 95f154f51..7413310ef 100644 --- a/internal/cmd/envgroup/getenvgroup.go +++ b/internal/cmd/envgroup/getenvgroup.go @@ -16,7 +16,6 @@ package envgroup import ( "internal/apiclient" - "internal/client/envgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/envgroup/import.go b/internal/cmd/envgroup/import.go index a629481f4..df3730f06 100644 --- a/internal/cmd/envgroup/import.go +++ b/internal/cmd/envgroup/import.go @@ -16,7 +16,6 @@ package envgroup import ( "internal/apiclient" - "internal/client/envgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/envgroup/listattach.go b/internal/cmd/envgroup/listattach.go index 9cf159f3c..5ea11667a 100644 --- a/internal/cmd/envgroup/listattach.go +++ b/internal/cmd/envgroup/listattach.go @@ -16,7 +16,6 @@ package envgroup import ( "internal/apiclient" - "internal/client/envgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/envgroup/listenvgroup.go b/internal/cmd/envgroup/listenvgroup.go index 32b6a7ef1..4c035af11 100644 --- a/internal/cmd/envgroup/listenvgroup.go +++ b/internal/cmd/envgroup/listenvgroup.go @@ -16,7 +16,6 @@ package envgroup import ( "internal/apiclient" - "internal/client/envgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/envgroup/updateenvgroup.go b/internal/cmd/envgroup/updateenvgroup.go index 4b6522ab9..70d019779 100644 --- a/internal/cmd/envgroup/updateenvgroup.go +++ b/internal/cmd/envgroup/updateenvgroup.go @@ -16,7 +16,6 @@ package envgroup import ( "internal/apiclient" - "internal/client/envgroups" "github.com/spf13/cobra" diff --git a/internal/cmd/eptattachment/crteptattachment.go b/internal/cmd/eptattachment/crteptattachment.go index 624e1d98c..6609f184e 100644 --- a/internal/cmd/eptattachment/crteptattachment.go +++ b/internal/cmd/eptattachment/crteptattachment.go @@ -17,13 +17,11 @@ package eptattachment import ( "encoding/json" "fmt" - "path/filepath" - "regexp" - "internal/apiclient" - "internal/client/eptattachment" "internal/client/operations" + "path/filepath" + "regexp" "github.com/spf13/cobra" ) @@ -62,8 +60,10 @@ var CreateCmd = &cobra.Command{ }, } -var location, serviceAttachment string -var wait bool +var ( + location, serviceAttachment string + wait bool +) func init() { CreateCmd.Flags().StringVarP(&name, "name", "n", diff --git a/internal/cmd/eptattachment/deleptattachment.go b/internal/cmd/eptattachment/deleptattachment.go index 201cbcce2..be933c9cc 100644 --- a/internal/cmd/eptattachment/deleptattachment.go +++ b/internal/cmd/eptattachment/deleptattachment.go @@ -17,10 +17,9 @@ package eptattachment import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/eptattachment" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/eptattachment/geteptattachment.go b/internal/cmd/eptattachment/geteptattachment.go index 6c59d9071..64fa725e7 100644 --- a/internal/cmd/eptattachment/geteptattachment.go +++ b/internal/cmd/eptattachment/geteptattachment.go @@ -16,7 +16,6 @@ package eptattachment import ( "internal/apiclient" - "internal/client/eptattachment" "github.com/spf13/cobra" diff --git a/internal/cmd/eptattachment/listeptattachment.go b/internal/cmd/eptattachment/listeptattachment.go index 5b0ff3323..ffe6c0a67 100644 --- a/internal/cmd/eptattachment/listeptattachment.go +++ b/internal/cmd/eptattachment/listeptattachment.go @@ -16,7 +16,6 @@ package eptattachment import ( "internal/apiclient" - "internal/client/eptattachment" "github.com/spf13/cobra" diff --git a/internal/cmd/flowhooks/crtfh.go b/internal/cmd/flowhooks/crtfh.go index 58f80b339..fea3f23b0 100644 --- a/internal/cmd/flowhooks/crtfh.go +++ b/internal/cmd/flowhooks/crtfh.go @@ -16,7 +16,6 @@ package flowhooks import ( "internal/apiclient" - "internal/client/flowhooks" "github.com/spf13/cobra" diff --git a/internal/cmd/flowhooks/delfh.go b/internal/cmd/flowhooks/delfh.go index d796c5059..1c720f990 100644 --- a/internal/cmd/flowhooks/delfh.go +++ b/internal/cmd/flowhooks/delfh.go @@ -16,7 +16,6 @@ package flowhooks import ( "internal/apiclient" - "internal/client/flowhooks" "github.com/spf13/cobra" diff --git a/internal/cmd/flowhooks/getfh.go b/internal/cmd/flowhooks/getfh.go index 892923068..fb489124e 100644 --- a/internal/cmd/flowhooks/getfh.go +++ b/internal/cmd/flowhooks/getfh.go @@ -16,7 +16,6 @@ package flowhooks import ( "internal/apiclient" - "internal/client/flowhooks" "github.com/spf13/cobra" diff --git a/internal/cmd/flowhooks/listfh.go b/internal/cmd/flowhooks/listfh.go index 15fe46df3..39b9d79c3 100644 --- a/internal/cmd/flowhooks/listfh.go +++ b/internal/cmd/flowhooks/listfh.go @@ -16,7 +16,6 @@ package flowhooks import ( "internal/apiclient" - "internal/client/flowhooks" "github.com/spf13/cobra" diff --git a/internal/cmd/iam/create.go b/internal/cmd/iam/create.go index 3ec713f5b..a8d973049 100644 --- a/internal/cmd/iam/create.go +++ b/internal/cmd/iam/create.go @@ -16,9 +16,8 @@ package iam import ( "fmt" - "strings" - "internal/apiclient" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/activatenat.go b/internal/cmd/instances/activatenat.go index 8115726f3..71ce984d8 100644 --- a/internal/cmd/instances/activatenat.go +++ b/internal/cmd/instances/activatenat.go @@ -17,10 +17,9 @@ package instances import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/instances" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/crtattachment.go b/internal/cmd/instances/crtattachment.go index 50577a0b5..d69e8f23f 100644 --- a/internal/cmd/instances/crtattachment.go +++ b/internal/cmd/instances/crtattachment.go @@ -17,10 +17,9 @@ package instances import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/instances" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/crtinstance.go b/internal/cmd/instances/crtinstance.go index 91db19987..3f17468ac 100644 --- a/internal/cmd/instances/crtinstance.go +++ b/internal/cmd/instances/crtinstance.go @@ -17,14 +17,12 @@ package instances import ( "encoding/json" "fmt" - "path/filepath" - "regexp" - "internal/apiclient" - "internal/client/instances" "internal/client/operations" "internal/client/orgs" + "path/filepath" + "regexp" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/delattachment.go b/internal/cmd/instances/delattachment.go index 456240b06..d856b190d 100644 --- a/internal/cmd/instances/delattachment.go +++ b/internal/cmd/instances/delattachment.go @@ -17,10 +17,9 @@ package instances import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/instances" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/deletenat.go b/internal/cmd/instances/deletenat.go index a06843824..03e3df162 100644 --- a/internal/cmd/instances/deletenat.go +++ b/internal/cmd/instances/deletenat.go @@ -17,10 +17,9 @@ package instances import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/instances" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/delinstance.go b/internal/cmd/instances/delinstance.go index b73707fb3..1768d4cd2 100644 --- a/internal/cmd/instances/delinstance.go +++ b/internal/cmd/instances/delinstance.go @@ -17,10 +17,9 @@ package instances import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/instances" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/getattachment.go b/internal/cmd/instances/getattachment.go index 642620d5c..4b1029415 100644 --- a/internal/cmd/instances/getattachment.go +++ b/internal/cmd/instances/getattachment.go @@ -16,7 +16,6 @@ package instances import ( "internal/apiclient" - "internal/client/instances" "github.com/spf13/cobra" diff --git a/internal/cmd/instances/getinstance.go b/internal/cmd/instances/getinstance.go index ad2cc0fa3..abee144cd 100644 --- a/internal/cmd/instances/getinstance.go +++ b/internal/cmd/instances/getinstance.go @@ -16,7 +16,6 @@ package instances import ( "internal/apiclient" - "internal/client/instances" "github.com/spf13/cobra" diff --git a/internal/cmd/instances/listattachments.go b/internal/cmd/instances/listattachments.go index a37e59733..9926d9983 100644 --- a/internal/cmd/instances/listattachments.go +++ b/internal/cmd/instances/listattachments.go @@ -16,7 +16,6 @@ package instances import ( "internal/apiclient" - "internal/client/instances" "github.com/spf13/cobra" diff --git a/internal/cmd/instances/listintance.go b/internal/cmd/instances/listintance.go index 29ea24070..beb858c4c 100644 --- a/internal/cmd/instances/listintance.go +++ b/internal/cmd/instances/listintance.go @@ -16,7 +16,6 @@ package instances import ( "internal/apiclient" - "internal/client/instances" "github.com/spf13/cobra" diff --git a/internal/cmd/instances/listnat.go b/internal/cmd/instances/listnat.go index b6f66e757..8b8c3f154 100644 --- a/internal/cmd/instances/listnat.go +++ b/internal/cmd/instances/listnat.go @@ -16,7 +16,6 @@ package instances import ( "internal/apiclient" - "internal/client/instances" "github.com/spf13/cobra" diff --git a/internal/cmd/instances/reservenat.go b/internal/cmd/instances/reservenat.go index 46953ab7f..fa06e2092 100644 --- a/internal/cmd/instances/reservenat.go +++ b/internal/cmd/instances/reservenat.go @@ -17,10 +17,9 @@ package instances import ( "encoding/json" "internal/apiclient" - "path/filepath" - "internal/client/instances" "internal/client/operations" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/instances/updtinstance.go b/internal/cmd/instances/updtinstance.go index a244f480d..a6c55de41 100644 --- a/internal/cmd/instances/updtinstance.go +++ b/internal/cmd/instances/updtinstance.go @@ -16,7 +16,6 @@ package instances import ( "internal/apiclient" - "internal/client/instances" "github.com/spf13/cobra" diff --git a/internal/cmd/keyaliases/crtka.go b/internal/cmd/keyaliases/crtka.go index bc9aa31b6..3c8c46714 100644 --- a/internal/cmd/keyaliases/crtka.go +++ b/internal/cmd/keyaliases/crtka.go @@ -16,11 +16,8 @@ package keyaliases import ( "fmt" - "internal/apiclient" - "internal/client/keyaliases" - "internal/cmd/utils" "github.com/spf13/cobra" diff --git a/internal/cmd/keyaliases/csr.go b/internal/cmd/keyaliases/csr.go index 097b46958..d277fbef8 100644 --- a/internal/cmd/keyaliases/csr.go +++ b/internal/cmd/keyaliases/csr.go @@ -16,7 +16,6 @@ package keyaliases import ( "internal/apiclient" - "internal/client/keyaliases" "github.com/spf13/cobra" diff --git a/internal/cmd/keyaliases/delka.go b/internal/cmd/keyaliases/delka.go index 8526d4398..aa857c34f 100644 --- a/internal/cmd/keyaliases/delka.go +++ b/internal/cmd/keyaliases/delka.go @@ -16,7 +16,6 @@ package keyaliases import ( "internal/apiclient" - "internal/client/keyaliases" "github.com/spf13/cobra" diff --git a/internal/cmd/keyaliases/getcert.go b/internal/cmd/keyaliases/getcert.go index 86a85debd..015ef98b7 100644 --- a/internal/cmd/keyaliases/getcert.go +++ b/internal/cmd/keyaliases/getcert.go @@ -16,12 +16,10 @@ package keyaliases import ( "fmt" - "os" - "internal/apiclient" - "internal/clilog" - "internal/client/keyaliases" + "internal/clilog" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/keyaliases/getka.go b/internal/cmd/keyaliases/getka.go index b6318233a..10c746677 100644 --- a/internal/cmd/keyaliases/getka.go +++ b/internal/cmd/keyaliases/getka.go @@ -16,7 +16,6 @@ package keyaliases import ( "internal/apiclient" - "internal/client/keyaliases" "github.com/spf13/cobra" diff --git a/internal/cmd/keyaliases/listka.go b/internal/cmd/keyaliases/listka.go index c581a463a..4a4a1c8b3 100644 --- a/internal/cmd/keyaliases/listka.go +++ b/internal/cmd/keyaliases/listka.go @@ -16,7 +16,6 @@ package keyaliases import ( "internal/apiclient" - "internal/client/keyaliases" "github.com/spf13/cobra" diff --git a/internal/cmd/keyaliases/updateka.go b/internal/cmd/keyaliases/updateka.go index 41c36ab25..3a49065d5 100644 --- a/internal/cmd/keyaliases/updateka.go +++ b/internal/cmd/keyaliases/updateka.go @@ -16,11 +16,8 @@ package keyaliases import ( "fmt" - "internal/apiclient" - "internal/client/keyaliases" - "internal/cmd/utils" "github.com/spf13/cobra" diff --git a/internal/cmd/keystores/crtks.go b/internal/cmd/keystores/crtks.go index 7e5b0368c..fc93ec2a6 100644 --- a/internal/cmd/keystores/crtks.go +++ b/internal/cmd/keystores/crtks.go @@ -16,7 +16,6 @@ package keystores import ( "internal/apiclient" - "internal/client/keystores" "github.com/spf13/cobra" diff --git a/internal/cmd/keystores/delks.go b/internal/cmd/keystores/delks.go index 3ffe42dcc..69f0477b2 100644 --- a/internal/cmd/keystores/delks.go +++ b/internal/cmd/keystores/delks.go @@ -16,7 +16,6 @@ package keystores import ( "internal/apiclient" - "internal/client/keystores" "github.com/spf13/cobra" diff --git a/internal/cmd/keystores/expks.go b/internal/cmd/keystores/expks.go index 5f5665d98..ae4d35157 100644 --- a/internal/cmd/keystores/expks.go +++ b/internal/cmd/keystores/expks.go @@ -15,11 +15,9 @@ package keystores import ( - "os" - "internal/apiclient" - "internal/client/keystores" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/keystores/getks.go b/internal/cmd/keystores/getks.go index 3a0f11c48..1b60d5393 100644 --- a/internal/cmd/keystores/getks.go +++ b/internal/cmd/keystores/getks.go @@ -16,7 +16,6 @@ package keystores import ( "internal/apiclient" - "internal/client/keystores" "github.com/spf13/cobra" diff --git a/internal/cmd/keystores/impks.go b/internal/cmd/keystores/impks.go index 4fae7ad42..90d06d019 100644 --- a/internal/cmd/keystores/impks.go +++ b/internal/cmd/keystores/impks.go @@ -16,7 +16,6 @@ package keystores import ( "internal/apiclient" - "internal/client/keystores" "github.com/spf13/cobra" diff --git a/internal/cmd/keystores/listks.go b/internal/cmd/keystores/listks.go index e9f479e9a..c337d0c5d 100644 --- a/internal/cmd/keystores/listks.go +++ b/internal/cmd/keystores/listks.go @@ -16,7 +16,6 @@ package keystores import ( "internal/apiclient" - "internal/client/keystores" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/crtentry.go b/internal/cmd/kvm/crtentry.go index fc2074cc1..2978f0d38 100644 --- a/internal/cmd/kvm/crtentry.go +++ b/internal/cmd/kvm/crtentry.go @@ -16,7 +16,6 @@ package kvm import ( "fmt" - "internal/apiclient" "internal/client/kvm" @@ -40,7 +39,7 @@ var CreateEntryCmd = &cobra.Command{ }, RunE: func(cmd *cobra.Command, args []string) (err error) { cmd.SilenceUsage = true - //value = getKVMString(value) + // value = getKVMString(value) _, err = kvm.CreateEntry(proxyName, mapName, keyName, value, false) return }, diff --git a/internal/cmd/kvm/crtkvm.go b/internal/cmd/kvm/crtkvm.go index 4b441f46e..c217c86b1 100644 --- a/internal/cmd/kvm/crtkvm.go +++ b/internal/cmd/kvm/crtkvm.go @@ -16,9 +16,7 @@ package kvm import ( "fmt" - "internal/apiclient" - "internal/client/kvm" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/delentry.go b/internal/cmd/kvm/delentry.go index 64d6db4e6..3f9da2f79 100644 --- a/internal/cmd/kvm/delentry.go +++ b/internal/cmd/kvm/delentry.go @@ -16,9 +16,7 @@ package kvm import ( "fmt" - "internal/apiclient" - "internal/client/kvm" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/delkvm.go b/internal/cmd/kvm/delkvm.go index 8d0de06e3..9bf1dd872 100644 --- a/internal/cmd/kvm/delkvm.go +++ b/internal/cmd/kvm/delkvm.go @@ -16,9 +16,7 @@ package kvm import ( "fmt" - "internal/apiclient" - "internal/client/kvm" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/expentries.go b/internal/cmd/kvm/expentries.go index 80d9606ce..c79629603 100644 --- a/internal/cmd/kvm/expentries.go +++ b/internal/cmd/kvm/expentries.go @@ -16,14 +16,11 @@ package kvm import ( "fmt" - "strconv" - "strings" - - "internal/cmd/utils" - "internal/apiclient" - "internal/client/kvm" + "internal/cmd/utils" + "strconv" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/kvm/expkvm.go b/internal/cmd/kvm/expkvm.go index b9aafe627..a1b23fdec 100644 --- a/internal/cmd/kvm/expkvm.go +++ b/internal/cmd/kvm/expkvm.go @@ -17,15 +17,12 @@ package kvm import ( "encoding/json" "fmt" - "strconv" - "strings" - - "internal/cmd/utils" - "internal/apiclient" - "internal/clilog" - "internal/client/kvm" + "internal/clilog" + "internal/cmd/utils" + "strconv" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/kvm/getentry.go b/internal/cmd/kvm/getentry.go index 277aa4fd6..3521a2295 100644 --- a/internal/cmd/kvm/getentry.go +++ b/internal/cmd/kvm/getentry.go @@ -16,9 +16,7 @@ package kvm import ( "fmt" - "internal/apiclient" - "internal/client/kvm" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/impentries.go b/internal/cmd/kvm/impentries.go index 365d90e30..807e9c8b3 100644 --- a/internal/cmd/kvm/impentries.go +++ b/internal/cmd/kvm/impentries.go @@ -16,9 +16,7 @@ package kvm import ( "fmt" - "internal/apiclient" - "internal/client/kvm" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/impkvms.go b/internal/cmd/kvm/impkvms.go index 139bff7e3..27b092caf 100644 --- a/internal/cmd/kvm/impkvms.go +++ b/internal/cmd/kvm/impkvms.go @@ -15,15 +15,12 @@ package kvm import ( - "path/filepath" - "strings" - "internal/apiclient" - "internal/clilog" - "internal/client/kvm" - + "internal/clilog" "internal/cmd/utils" + "path/filepath" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/kvm/listentry.go b/internal/cmd/kvm/listentry.go index 4736b4a33..91e8c3c66 100644 --- a/internal/cmd/kvm/listentry.go +++ b/internal/cmd/kvm/listentry.go @@ -16,9 +16,7 @@ package kvm import ( "fmt" - "internal/apiclient" - "internal/client/kvm" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/listkvm.go b/internal/cmd/kvm/listkvm.go index da81ccf67..b96039c8f 100644 --- a/internal/cmd/kvm/listkvm.go +++ b/internal/cmd/kvm/listkvm.go @@ -16,9 +16,7 @@ package kvm import ( "fmt" - "internal/apiclient" - "internal/client/kvm" "github.com/spf13/cobra" diff --git a/internal/cmd/kvm/updentry.go b/internal/cmd/kvm/updentry.go index cc36bcc76..3c5117acb 100644 --- a/internal/cmd/kvm/updentry.go +++ b/internal/cmd/kvm/updentry.go @@ -16,7 +16,6 @@ package kvm import ( "fmt" - "internal/apiclient" "internal/client/kvm" diff --git a/internal/cmd/ops/getops.go b/internal/cmd/ops/getops.go index 3a0a97117..2908ef097 100644 --- a/internal/cmd/ops/getops.go +++ b/internal/cmd/ops/getops.go @@ -16,7 +16,6 @@ package ops import ( "internal/apiclient" - "internal/client/operations" "github.com/spf13/cobra" diff --git a/internal/cmd/ops/listops.go b/internal/cmd/ops/listops.go index 2f807aa7e..44ed16cdb 100644 --- a/internal/cmd/ops/listops.go +++ b/internal/cmd/ops/listops.go @@ -16,9 +16,7 @@ package ops import ( "fmt" - "internal/apiclient" - "internal/client/operations" "github.com/spf13/cobra" diff --git a/internal/cmd/org/createorg.go b/internal/cmd/org/createorg.go index d04bc89e4..2c6176231 100644 --- a/internal/cmd/org/createorg.go +++ b/internal/cmd/org/createorg.go @@ -17,12 +17,10 @@ package org import ( "encoding/json" "fmt" - "path/filepath" - "internal/apiclient" - "internal/client/operations" "internal/client/orgs" + "path/filepath" "github.com/spf13/cobra" ) diff --git a/internal/cmd/org/delorg.go b/internal/cmd/org/delorg.go index 459a673ed..7c1fa74e7 100644 --- a/internal/cmd/org/delorg.go +++ b/internal/cmd/org/delorg.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/enableac.go b/internal/cmd/org/enableac.go index 275a9e7ec..1a64aa1f0 100644 --- a/internal/cmd/org/enableac.go +++ b/internal/cmd/org/enableac.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/enableaxob.go b/internal/cmd/org/enableaxob.go index eb424bde1..71cd6af65 100644 --- a/internal/cmd/org/enableaxob.go +++ b/internal/cmd/org/enableaxob.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/export.go b/internal/cmd/org/export.go index 303092028..5a0f16d16 100644 --- a/internal/cmd/org/export.go +++ b/internal/cmd/org/export.go @@ -16,18 +16,7 @@ package org import ( "encoding/json" - "os" - "path" - "strconv" - "strings" - "syscall" - - "internal/cmd/utils" - "internal/apiclient" - - "internal/clilog" - "internal/client/apicategories" "internal/client/apidocs" "internal/client/apis" @@ -46,6 +35,13 @@ import ( "internal/client/sharedflows" "internal/client/sync" "internal/client/targetservers" + "internal/clilog" + "internal/cmd/utils" + "os" + "path" + "strconv" + "strings" + "syscall" "github.com/spf13/cobra" ) diff --git a/internal/cmd/org/getorg.go b/internal/cmd/org/getorg.go index a33c23aac..a56c98d57 100644 --- a/internal/cmd/org/getorg.go +++ b/internal/cmd/org/getorg.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/import.go b/internal/cmd/org/import.go index 47bc3261e..3d088e509 100644 --- a/internal/cmd/org/import.go +++ b/internal/cmd/org/import.go @@ -17,14 +17,7 @@ package org import ( "encoding/json" "fmt" - "io" - "os" - "path" - "internal/apiclient" - - "internal/clilog" - "internal/client/apis" "internal/client/apps" "internal/client/datacollectors" @@ -36,12 +29,14 @@ import ( "internal/client/orgs" "internal/client/products" "internal/client/references" + "internal/client/securityprofiles" "internal/client/sharedflows" "internal/client/targetservers" - - "internal/client/securityprofiles" - + "internal/clilog" "internal/cmd/utils" + "io" + "os" + "path" "github.com/spf13/cobra" ) diff --git a/internal/cmd/org/ingressconfig.go b/internal/cmd/org/ingressconfig.go index e6ebdafa0..8b99285ab 100644 --- a/internal/cmd/org/ingressconfig.go +++ b/internal/cmd/org/ingressconfig.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/reportmonthly.go b/internal/cmd/org/reportmonthly.go index ddd78c045..1ede388c9 100644 --- a/internal/cmd/org/reportmonthly.go +++ b/internal/cmd/org/reportmonthly.go @@ -16,15 +16,13 @@ package org import ( "fmt" + "internal/apiclient" + "internal/client/orgs" + "internal/clilog" "os" "text/tabwriter" "time" - "internal/apiclient" - "internal/clilog" - - "internal/client/orgs" - "github.com/spf13/cobra" ) diff --git a/internal/cmd/org/reports.go b/internal/cmd/org/reports.go index 02800f50c..f3e9dd492 100644 --- a/internal/cmd/org/reports.go +++ b/internal/cmd/org/reports.go @@ -26,8 +26,10 @@ var ReportCmd = &cobra.Command{ Long: "Report Apigee Org Usage", } -const apiCallsHeader = "\tAPI CALLS" -const proxyTypeHeader = "\tEXTENSIBLE PROXY\tSTANDARD PROXY" +const ( + apiCallsHeader = "\tAPI CALLS" + proxyTypeHeader = "\tEXTENSIBLE PROXY\tSTANDARD PROXY" +) func init() { ReportCmd.AddCommand(MonthlyCmd) diff --git a/internal/cmd/org/reportyearly.go b/internal/cmd/org/reportyearly.go index 176f6c1cf..0b1681368 100644 --- a/internal/cmd/org/reportyearly.go +++ b/internal/cmd/org/reportyearly.go @@ -16,15 +16,13 @@ package org import ( "fmt" + "internal/apiclient" + "internal/client/orgs" + "internal/clilog" "os" "text/tabwriter" "time" - "internal/apiclient" - "internal/clilog" - - "internal/client/orgs" - "github.com/spf13/cobra" ) diff --git a/internal/cmd/org/setaddons.go b/internal/cmd/org/setaddons.go index 763c9e8fa..18977f2a4 100644 --- a/internal/cmd/org/setaddons.go +++ b/internal/cmd/org/setaddons.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/setmart.go b/internal/cmd/org/setmart.go index 237324c00..c99bb8a3f 100644 --- a/internal/cmd/org/setmart.go +++ b/internal/cmd/org/setmart.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/setprop.go b/internal/cmd/org/setprop.go index b5358eb19..a2c7c676a 100644 --- a/internal/cmd/org/setprop.go +++ b/internal/cmd/org/setprop.go @@ -16,7 +16,6 @@ package org import ( "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/org/updateorg.go b/internal/cmd/org/updateorg.go index 8a0dcf570..c4fe0190a 100644 --- a/internal/cmd/org/updateorg.go +++ b/internal/cmd/org/updateorg.go @@ -16,9 +16,7 @@ package org import ( "fmt" - "internal/apiclient" - "internal/client/orgs" "github.com/spf13/cobra" diff --git a/internal/cmd/products/crtprod.go b/internal/cmd/products/crtprod.go index 8f681c0ab..46f8f3309 100644 --- a/internal/cmd/products/crtprod.go +++ b/internal/cmd/products/crtprod.go @@ -16,9 +16,8 @@ package products import ( "internal/apiclient" - "strings" - "internal/client/products" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/products/crtrateplan.go b/internal/cmd/products/crtrateplan.go index 4c34d8674..91efd3328 100644 --- a/internal/cmd/products/crtrateplan.go +++ b/internal/cmd/products/crtrateplan.go @@ -15,13 +15,10 @@ package products import ( - "os" - "internal/apiclient" - - "internal/clilog" - "internal/client/products" + "internal/clilog" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/products/delattrprod.go b/internal/cmd/products/delattrprod.go index 5080c73e1..39f713832 100644 --- a/internal/cmd/products/delattrprod.go +++ b/internal/cmd/products/delattrprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/delprod.go b/internal/cmd/products/delprod.go index 4b5978398..3c6d4c16d 100644 --- a/internal/cmd/products/delprod.go +++ b/internal/cmd/products/delprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/delrateplan.go b/internal/cmd/products/delrateplan.go index 397a36544..a0f12da92 100644 --- a/internal/cmd/products/delrateplan.go +++ b/internal/cmd/products/delrateplan.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/expprod.go b/internal/cmd/products/expprod.go index 61fe0997d..b1c3d93f0 100644 --- a/internal/cmd/products/expprod.go +++ b/internal/cmd/products/expprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/exprateplan.go b/internal/cmd/products/exprateplan.go index 4203b1b40..dcda53e12 100644 --- a/internal/cmd/products/exprateplan.go +++ b/internal/cmd/products/exprateplan.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/getattrprod.go b/internal/cmd/products/getattrprod.go index 3b16edf65..96a0111a7 100644 --- a/internal/cmd/products/getattrprod.go +++ b/internal/cmd/products/getattrprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/getprod.go b/internal/cmd/products/getprod.go index 5beb2dd61..9690371a3 100644 --- a/internal/cmd/products/getprod.go +++ b/internal/cmd/products/getprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/getrateplan.go b/internal/cmd/products/getrateplan.go index c74be76f4..79c4e3035 100644 --- a/internal/cmd/products/getrateplan.go +++ b/internal/cmd/products/getrateplan.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/impprod.go b/internal/cmd/products/impprod.go index 778095f9f..007d59ea7 100644 --- a/internal/cmd/products/impprod.go +++ b/internal/cmd/products/impprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/listattrprod.go b/internal/cmd/products/listattrprod.go index a31cc55b5..6e4b56374 100644 --- a/internal/cmd/products/listattrprod.go +++ b/internal/cmd/products/listattrprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/listproducts.go b/internal/cmd/products/listproducts.go index da6ac072c..a848b507e 100644 --- a/internal/cmd/products/listproducts.go +++ b/internal/cmd/products/listproducts.go @@ -16,9 +16,7 @@ package products import ( "fmt" - "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/listrateplan.go b/internal/cmd/products/listrateplan.go index 078715608..9c6c79a4e 100644 --- a/internal/cmd/products/listrateplan.go +++ b/internal/cmd/products/listrateplan.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/products.go b/internal/cmd/products/products.go index 3c1889e87..0148eb7da 100644 --- a/internal/cmd/products/products.go +++ b/internal/cmd/products/products.go @@ -16,11 +16,9 @@ package products import ( "encoding/json" - "os" - - "internal/clilog" - "internal/client/products" + "internal/clilog" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/products/updattrprod.go b/internal/cmd/products/updattrprod.go index ec1bd0eba..a566d6c85 100644 --- a/internal/cmd/products/updattrprod.go +++ b/internal/cmd/products/updattrprod.go @@ -16,7 +16,6 @@ package products import ( "internal/apiclient" - "internal/client/products" "github.com/spf13/cobra" diff --git a/internal/cmd/products/updprod.go b/internal/cmd/products/updprod.go index 0d6168c18..83ff83715 100644 --- a/internal/cmd/products/updprod.go +++ b/internal/cmd/products/updprod.go @@ -16,9 +16,8 @@ package products import ( "internal/apiclient" - "strings" - "internal/client/products" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/projects/testiam.go b/internal/cmd/projects/testiam.go index 6b0fce6d3..518b651fc 100644 --- a/internal/cmd/projects/testiam.go +++ b/internal/cmd/projects/testiam.go @@ -15,11 +15,10 @@ package projects import ( + "internal/apiclient" "net/url" "path" - "internal/apiclient" - "github.com/spf13/cobra" ) diff --git a/internal/cmd/references/crtref.go b/internal/cmd/references/crtref.go index c41fcd9e4..944d15110 100644 --- a/internal/cmd/references/crtref.go +++ b/internal/cmd/references/crtref.go @@ -16,9 +16,7 @@ package references import ( "fmt" - "internal/apiclient" - "internal/client/references" "github.com/spf13/cobra" diff --git a/internal/cmd/references/delref.go b/internal/cmd/references/delref.go index daaf4479f..ab421e6ce 100644 --- a/internal/cmd/references/delref.go +++ b/internal/cmd/references/delref.go @@ -16,7 +16,6 @@ package references import ( "internal/apiclient" - "internal/client/references" "github.com/spf13/cobra" diff --git a/internal/cmd/references/expref.go b/internal/cmd/references/expref.go index 05d43d63e..8f268429f 100644 --- a/internal/cmd/references/expref.go +++ b/internal/cmd/references/expref.go @@ -16,7 +16,6 @@ package references import ( "internal/apiclient" - "internal/client/references" "github.com/spf13/cobra" diff --git a/internal/cmd/references/getref.go b/internal/cmd/references/getref.go index 4d6088475..e64510615 100644 --- a/internal/cmd/references/getref.go +++ b/internal/cmd/references/getref.go @@ -16,7 +16,6 @@ package references import ( "internal/apiclient" - "internal/client/references" "github.com/spf13/cobra" diff --git a/internal/cmd/references/impref.go b/internal/cmd/references/impref.go index 2aabb5d14..0a94b52f9 100644 --- a/internal/cmd/references/impref.go +++ b/internal/cmd/references/impref.go @@ -16,7 +16,6 @@ package references import ( "internal/apiclient" - "internal/client/references" "github.com/spf13/cobra" diff --git a/internal/cmd/references/listref.go b/internal/cmd/references/listref.go index 3d63f2497..dab0b98e0 100644 --- a/internal/cmd/references/listref.go +++ b/internal/cmd/references/listref.go @@ -16,7 +16,6 @@ package references import ( "internal/apiclient" - "internal/client/references" "github.com/spf13/cobra" diff --git a/internal/cmd/references/updateref.go b/internal/cmd/references/updateref.go index a065d1bef..b33589e2d 100644 --- a/internal/cmd/references/updateref.go +++ b/internal/cmd/references/updateref.go @@ -16,9 +16,7 @@ package references import ( "fmt" - "internal/apiclient" - "internal/client/references" "github.com/spf13/cobra" diff --git a/internal/cmd/res/crtres.go b/internal/cmd/res/crtres.go index 615ef0650..c350101d1 100644 --- a/internal/cmd/res/crtres.go +++ b/internal/cmd/res/crtres.go @@ -15,11 +15,9 @@ package res import ( - "strings" - "internal/apiclient" - "internal/client/res" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/res/delres.go b/internal/cmd/res/delres.go index 5f0fba5bb..5e9ab6169 100644 --- a/internal/cmd/res/delres.go +++ b/internal/cmd/res/delres.go @@ -15,11 +15,9 @@ package res import ( - "strings" - "internal/apiclient" - "internal/client/res" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/res/getres.go b/internal/cmd/res/getres.go index 58fed119e..3d79fc91f 100644 --- a/internal/cmd/res/getres.go +++ b/internal/cmd/res/getres.go @@ -15,11 +15,9 @@ package res import ( - "strings" - "internal/apiclient" - "internal/client/res" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/res/listres.go b/internal/cmd/res/listres.go index e78c6889e..721c068a6 100644 --- a/internal/cmd/res/listres.go +++ b/internal/cmd/res/listres.go @@ -16,7 +16,6 @@ package res import ( "internal/apiclient" - "internal/client/res" "github.com/spf13/cobra" diff --git a/internal/cmd/res/updres.go b/internal/cmd/res/updres.go index 24b000a15..0e4b9b0ae 100644 --- a/internal/cmd/res/updres.go +++ b/internal/cmd/res/updres.go @@ -15,11 +15,9 @@ package res import ( - "strings" - "internal/apiclient" - "internal/client/res" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 7bacdc994..dcd482a6c 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -18,29 +18,20 @@ import ( "context" "encoding/json" "fmt" - "io" - "net/http" - "os" - "strconv" - "internal/apiclient" - "internal/clilog" - "internal/cmd/apicategories" "internal/cmd/apidocs" "internal/cmd/apihub" "internal/cmd/apis" "internal/cmd/appgroups" "internal/cmd/apps" - cache "internal/cmd/cache" "internal/cmd/datacollectors" "internal/cmd/datastores" "internal/cmd/developers" "internal/cmd/env" "internal/cmd/envgroup" "internal/cmd/eptattachment" - flowhooks "internal/cmd/flowhooks" "internal/cmd/iam" "internal/cmd/instances" "internal/cmd/keyaliases" @@ -52,14 +43,24 @@ import ( "internal/cmd/products" "internal/cmd/projects" "internal/cmd/references" - res "internal/cmd/res" "internal/cmd/securityprofiles" "internal/cmd/sharedflows" "internal/cmd/sites" "internal/cmd/sync" - targetservers "internal/cmd/targetservers" "internal/cmd/token" "internal/cmd/tree" + "io" + "net/http" + "os" + "strconv" + + cache "internal/cmd/cache" + + flowhooks "internal/cmd/flowhooks" + + res "internal/cmd/res" + + targetservers "internal/cmd/targetservers" "github.com/spf13/cobra" ) @@ -70,7 +71,6 @@ var RootCmd = &cobra.Command{ Short: "Utility to work with Apigee APIs.", Long: "This command lets you interact with Apigee APIs.", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { - if metadataToken && defaultToken { return fmt.Errorf("metadata-token and default-token cannot be used together") } diff --git a/internal/cmd/securityprofiles/compute.go b/internal/cmd/securityprofiles/compute.go index 29099b5eb..0d21fd8d2 100644 --- a/internal/cmd/securityprofiles/compute.go +++ b/internal/cmd/securityprofiles/compute.go @@ -16,10 +16,9 @@ package securityprofiles import ( "fmt" - "time" - "internal/apiclient" "internal/client/securityprofiles" + "time" "github.com/spf13/cobra" ) diff --git a/internal/cmd/securityprofiles/create.go b/internal/cmd/securityprofiles/create.go index 74ab1ce19..fb812ddf9 100644 --- a/internal/cmd/securityprofiles/create.go +++ b/internal/cmd/securityprofiles/create.go @@ -17,7 +17,6 @@ package securityprofiles import ( "internal/apiclient" "internal/client/securityprofiles" - "internal/cmd/utils" "github.com/spf13/cobra" diff --git a/internal/cmd/securityprofiles/export.go b/internal/cmd/securityprofiles/export.go index f2347470e..eb06934b1 100644 --- a/internal/cmd/securityprofiles/export.go +++ b/internal/cmd/securityprofiles/export.go @@ -15,11 +15,9 @@ package securityprofiles import ( - "os" - "internal/apiclient" - "internal/client/securityprofiles" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/securityprofiles/import.go b/internal/cmd/securityprofiles/import.go index a6bb73215..4692d1b10 100644 --- a/internal/cmd/securityprofiles/import.go +++ b/internal/cmd/securityprofiles/import.go @@ -16,11 +16,9 @@ package securityprofiles import ( "fmt" - "os" - "internal/apiclient" - "internal/client/securityprofiles" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/securityprofiles/update.go b/internal/cmd/securityprofiles/update.go index 847a2c20b..3f19f97a6 100644 --- a/internal/cmd/securityprofiles/update.go +++ b/internal/cmd/securityprofiles/update.go @@ -17,7 +17,6 @@ package securityprofiles import ( "internal/apiclient" "internal/client/securityprofiles" - "internal/cmd/utils" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/bundlecrtsf.go b/internal/cmd/sharedflows/bundlecrtsf.go index 449bb8a87..de6c0aa53 100644 --- a/internal/cmd/sharedflows/bundlecrtsf.go +++ b/internal/cmd/sharedflows/bundlecrtsf.go @@ -16,16 +16,13 @@ package sharedflows import ( "fmt" - "os" - "path" - "path/filepath" - "internal/apiclient" - "internal/clilog" - "internal/bundlegen/proxybundle" - "internal/client/sharedflows" + "internal/clilog" + "os" + "path" + "path/filepath" cp "github.com/otiai10/copy" diff --git a/internal/cmd/sharedflows/cleansf.go b/internal/cmd/sharedflows/cleansf.go index a98919bbc..9b6ff0380 100644 --- a/internal/cmd/sharedflows/cleansf.go +++ b/internal/cmd/sharedflows/cleansf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/common.go b/internal/cmd/sharedflows/common.go index d86653034..3822989cd 100644 --- a/internal/cmd/sharedflows/common.go +++ b/internal/cmd/sharedflows/common.go @@ -17,12 +17,11 @@ package sharedflows import ( "encoding/json" "fmt" - "strconv" - "time" - "internal/apiclient" "internal/client/sharedflows" "internal/clilog" + "strconv" + "time" ) func GetRevision(respBody []byte) (revision int, err error) { diff --git a/internal/cmd/sharedflows/delsf.go b/internal/cmd/sharedflows/delsf.go index 7f99449df..484a38476 100644 --- a/internal/cmd/sharedflows/delsf.go +++ b/internal/cmd/sharedflows/delsf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/depsf.go b/internal/cmd/sharedflows/depsf.go index c1e977f97..bae571360 100644 --- a/internal/cmd/sharedflows/depsf.go +++ b/internal/cmd/sharedflows/depsf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/expsf.go b/internal/cmd/sharedflows/expsf.go index ba05656f1..5046ff01f 100644 --- a/internal/cmd/sharedflows/expsf.go +++ b/internal/cmd/sharedflows/expsf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/fetchsf.go b/internal/cmd/sharedflows/fetchsf.go index 326176402..a14763f3b 100644 --- a/internal/cmd/sharedflows/fetchsf.go +++ b/internal/cmd/sharedflows/fetchsf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/getsf.go b/internal/cmd/sharedflows/getsf.go index b1f2d8a09..c6ae675eb 100644 --- a/internal/cmd/sharedflows/getsf.go +++ b/internal/cmd/sharedflows/getsf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/ghcrtsf.go b/internal/cmd/sharedflows/ghcrtsf.go index 571cfe15e..717775bff 100644 --- a/internal/cmd/sharedflows/ghcrtsf.go +++ b/internal/cmd/sharedflows/ghcrtsf.go @@ -16,13 +16,11 @@ package sharedflows import ( "fmt" - "os" - "regexp" - "internal/apiclient" "internal/client/sharedflows" - "internal/clilog" + "os" + "regexp" proxybundle "internal/bundlegen/proxybundle" diff --git a/internal/cmd/sharedflows/impsfs.go b/internal/cmd/sharedflows/impsfs.go index 95889781c..bc93a9748 100644 --- a/internal/cmd/sharedflows/impsfs.go +++ b/internal/cmd/sharedflows/impsfs.go @@ -16,11 +16,9 @@ package sharedflows import ( "fmt" - "os" - "internal/apiclient" - "internal/client/sharedflows" + "os" "github.com/spf13/cobra" ) diff --git a/internal/cmd/sharedflows/listdeploy.go b/internal/cmd/sharedflows/listdeploy.go index d748f31da..618ff0260 100644 --- a/internal/cmd/sharedflows/listdeploy.go +++ b/internal/cmd/sharedflows/listdeploy.go @@ -16,9 +16,7 @@ package sharedflows import ( "fmt" - "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/listsf.go b/internal/cmd/sharedflows/listsf.go index c169cffee..3a84b37aa 100644 --- a/internal/cmd/sharedflows/listsf.go +++ b/internal/cmd/sharedflows/listsf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sharedflows/undepsf.go b/internal/cmd/sharedflows/undepsf.go index d7593b592..4408be448 100644 --- a/internal/cmd/sharedflows/undepsf.go +++ b/internal/cmd/sharedflows/undepsf.go @@ -16,7 +16,6 @@ package sharedflows import ( "internal/apiclient" - "internal/client/sharedflows" "github.com/spf13/cobra" diff --git a/internal/cmd/sync/getsync.go b/internal/cmd/sync/getsync.go index 64091c630..5d9003650 100644 --- a/internal/cmd/sync/getsync.go +++ b/internal/cmd/sync/getsync.go @@ -16,7 +16,6 @@ package sync import ( "internal/apiclient" - "internal/client/sync" "github.com/spf13/cobra" diff --git a/internal/cmd/sync/removesync.go b/internal/cmd/sync/removesync.go index 53756cefe..ff48117d8 100644 --- a/internal/cmd/sync/removesync.go +++ b/internal/cmd/sync/removesync.go @@ -16,11 +16,9 @@ package sync import ( "fmt" - "strings" - "internal/apiclient" - "internal/client/sync" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/sync/resetsync.go b/internal/cmd/sync/resetsync.go index 7dc0cfe49..062e5dd04 100644 --- a/internal/cmd/sync/resetsync.go +++ b/internal/cmd/sync/resetsync.go @@ -16,7 +16,6 @@ package sync import ( "internal/apiclient" - "internal/client/sync" "github.com/spf13/cobra" diff --git a/internal/cmd/sync/setsync.go b/internal/cmd/sync/setsync.go index 8d9a22a65..3d5a16da2 100644 --- a/internal/cmd/sync/setsync.go +++ b/internal/cmd/sync/setsync.go @@ -16,11 +16,9 @@ package sync import ( "fmt" - "strings" - "internal/apiclient" - "internal/client/sync" + "strings" "github.com/spf13/cobra" ) diff --git a/internal/cmd/targetservers/crtts.go b/internal/cmd/targetservers/crtts.go index a26e86866..726bb2450 100644 --- a/internal/cmd/targetservers/crtts.go +++ b/internal/cmd/targetservers/crtts.go @@ -16,11 +16,9 @@ package targetservers import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/targetservers" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/targetservers/delts.go b/internal/cmd/targetservers/delts.go index 1fb3b60f5..bf25a4f66 100644 --- a/internal/cmd/targetservers/delts.go +++ b/internal/cmd/targetservers/delts.go @@ -16,7 +16,6 @@ package targetservers import ( "internal/apiclient" - "internal/client/targetservers" "github.com/spf13/cobra" diff --git a/internal/cmd/targetservers/expts.go b/internal/cmd/targetservers/expts.go index 0e211d7c5..b370146e4 100644 --- a/internal/cmd/targetservers/expts.go +++ b/internal/cmd/targetservers/expts.go @@ -16,7 +16,6 @@ package targetservers import ( "internal/apiclient" - "internal/client/targetservers" "github.com/spf13/cobra" diff --git a/internal/cmd/targetservers/getts.go b/internal/cmd/targetservers/getts.go index 2ab7b9cf6..f8f894a45 100644 --- a/internal/cmd/targetservers/getts.go +++ b/internal/cmd/targetservers/getts.go @@ -16,7 +16,6 @@ package targetservers import ( "internal/apiclient" - "internal/client/targetservers" "github.com/spf13/cobra" diff --git a/internal/cmd/targetservers/impts.go b/internal/cmd/targetservers/impts.go index 523ee1d1d..f2a008904 100644 --- a/internal/cmd/targetservers/impts.go +++ b/internal/cmd/targetservers/impts.go @@ -16,7 +16,6 @@ package targetservers import ( "internal/apiclient" - "internal/client/targetservers" "github.com/spf13/cobra" diff --git a/internal/cmd/targetservers/listts.go b/internal/cmd/targetservers/listts.go index f800a972b..d14df0c82 100644 --- a/internal/cmd/targetservers/listts.go +++ b/internal/cmd/targetservers/listts.go @@ -16,7 +16,6 @@ package targetservers import ( "internal/apiclient" - "internal/client/targetservers" "github.com/spf13/cobra" diff --git a/internal/cmd/targetservers/updatets.go b/internal/cmd/targetservers/updatets.go index 56db2a91e..9aeaa323e 100644 --- a/internal/cmd/targetservers/updatets.go +++ b/internal/cmd/targetservers/updatets.go @@ -16,11 +16,9 @@ package targetservers import ( "fmt" - "strconv" - "internal/apiclient" - "internal/client/targetservers" + "strconv" "github.com/spf13/cobra" ) diff --git a/internal/cmd/token/cachetk.go b/internal/cmd/token/cachetk.go index 6d9d9bbef..e9c8d7583 100644 --- a/internal/cmd/token/cachetk.go +++ b/internal/cmd/token/cachetk.go @@ -16,7 +16,6 @@ package token import ( "internal/apiclient" - "internal/clilog" "github.com/spf13/cobra" diff --git a/internal/cmd/token/gettk.go b/internal/cmd/token/gettk.go index 2238d92f1..087b2e82d 100644 --- a/internal/cmd/token/gettk.go +++ b/internal/cmd/token/gettk.go @@ -16,7 +16,6 @@ package token import ( "internal/apiclient" - "internal/clilog" "github.com/spf13/cobra" diff --git a/internal/cmd/utils/utils.go b/internal/cmd/utils/utils.go index 8dddc650f..dbe37f1fe 100644 --- a/internal/cmd/utils/utils.go +++ b/internal/cmd/utils/utils.go @@ -16,13 +16,12 @@ package utils import ( "encoding/json" + "internal/clilog" "io" "os" "path/filepath" "regexp" "strings" - - "internal/clilog" ) // Org variable is used within the registry cmd