From 26117624378b4ddc4381398c368d02466651b9d7 Mon Sep 17 00:00:00 2001 From: Radu Matei Date: Thu, 4 Apr 2019 17:42:03 +0300 Subject: [PATCH] Make linter happy with the import order --- cmd/duffle/build.go | 17 +++++++++-------- cmd/duffle/bundle_sign.go | 2 +- cmd/duffle/claims_show_test.go | 4 ++-- cmd/duffle/claims_test.go | 4 ++-- cmd/duffle/credential_generate.go | 2 +- cmd/duffle/install.go | 2 +- cmd/duffle/install_test.go | 2 +- cmd/duffle/main.go | 5 ++--- cmd/duffle/main_test.go | 3 +-- cmd/duffle/pull.go | 5 +++-- cmd/duffle/push.go | 5 +++-- cmd/duffle/root_test.go | 1 + cmd/duffle/search.go | 2 +- cmd/duffle/upgrade_test.go | 1 + pkg/action/action.go | 1 + pkg/action/action_test.go | 4 ++-- pkg/action/run_custom_test.go | 4 ++-- pkg/builder/builder.go | 2 +- pkg/builder/builder_test.go | 1 + pkg/claim/claimstore_test.go | 2 +- pkg/loader/loader.go | 1 + pkg/loader/secure_loader.go | 1 + pkg/packager/export.go | 2 +- 23 files changed, 40 insertions(+), 33 deletions(-) diff --git a/cmd/duffle/build.go b/cmd/duffle/build.go index 3dd54297..a6e1a28f 100644 --- a/cmd/duffle/build.go +++ b/cmd/duffle/build.go @@ -10,6 +10,15 @@ import ( "path/filepath" "github.com/deislabs/cnab-go/bundle" + "github.com/docker/cli/cli/command" + cliconfig "github.com/docker/cli/cli/config" + dockerdebug "github.com/docker/cli/cli/debug" + dockerflags "github.com/docker/cli/cli/flags" + "github.com/docker/cli/opts" + "github.com/docker/go-connections/tlsconfig" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "github.com/deislabs/duffle/pkg/builder" "github.com/deislabs/duffle/pkg/crypto/digest" "github.com/deislabs/duffle/pkg/duffle/home" @@ -20,14 +29,6 @@ import ( "github.com/deislabs/duffle/pkg/ohai" "github.com/deislabs/duffle/pkg/repo" "github.com/deislabs/duffle/pkg/signature" - "github.com/docker/cli/cli/command" - cliconfig "github.com/docker/cli/cli/config" - dockerdebug "github.com/docker/cli/cli/debug" - dockerflags "github.com/docker/cli/cli/flags" - "github.com/docker/cli/opts" - "github.com/docker/go-connections/tlsconfig" - "github.com/spf13/cobra" - "github.com/spf13/pflag" ) const buildDesc = ` diff --git a/cmd/duffle/bundle_sign.go b/cmd/duffle/bundle_sign.go index 28b35871..6de31666 100644 --- a/cmd/duffle/bundle_sign.go +++ b/cmd/duffle/bundle_sign.go @@ -8,9 +8,9 @@ import ( "os" "path/filepath" + "github.com/deislabs/cnab-go/bundle" "github.com/spf13/cobra" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/crypto/digest" "github.com/deislabs/duffle/pkg/duffle/home" "github.com/deislabs/duffle/pkg/signature" diff --git a/cmd/duffle/claims_show_test.go b/cmd/duffle/claims_show_test.go index 46d7a878..92a47f1c 100644 --- a/cmd/duffle/claims_show_test.go +++ b/cmd/duffle/claims_show_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/deislabs/cnab-go/bundle" - "github.com/deislabs/duffle/pkg/claim" - "github.com/stretchr/testify/assert" + + "github.com/deislabs/duffle/pkg/claim" ) func TestDisplayClaim(t *testing.T) { diff --git a/cmd/duffle/claims_test.go b/cmd/duffle/claims_test.go index 88748d46..e60c8f1a 100644 --- a/cmd/duffle/claims_test.go +++ b/cmd/duffle/claims_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/deislabs/cnab-go/bundle" - "github.com/deislabs/duffle/pkg/claim" - "github.com/stretchr/testify/assert" + + "github.com/deislabs/duffle/pkg/claim" ) func TestMockClaimStore(t *testing.T) { diff --git a/cmd/duffle/credential_generate.go b/cmd/duffle/credential_generate.go index 531a96e2..5e2c7b41 100644 --- a/cmd/duffle/credential_generate.go +++ b/cmd/duffle/credential_generate.go @@ -9,11 +9,11 @@ import ( "sort" "strings" + "github.com/deislabs/cnab-go/bundle" "github.com/spf13/cobra" survey "gopkg.in/AlecAivazis/survey.v1" yaml "gopkg.in/yaml.v2" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/credentials" "github.com/deislabs/duffle/pkg/duffle/home" ) diff --git a/cmd/duffle/install.go b/cmd/duffle/install.go index 88812da4..88de6d11 100644 --- a/cmd/duffle/install.go +++ b/cmd/duffle/install.go @@ -7,11 +7,11 @@ import ( "path/filepath" "strings" + "github.com/deislabs/cnab-go/bundle" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/deislabs/duffle/pkg/action" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/claim" "github.com/deislabs/duffle/pkg/duffle/home" "github.com/deislabs/duffle/pkg/repo" diff --git a/cmd/duffle/install_test.go b/cmd/duffle/install_test.go index 739ac7ef..7bc80661 100644 --- a/cmd/duffle/install_test.go +++ b/cmd/duffle/install_test.go @@ -6,9 +6,9 @@ import ( "path/filepath" "testing" + "github.com/deislabs/cnab-go/bundle" "github.com/stretchr/testify/assert" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/duffle/home" ) diff --git a/cmd/duffle/main.go b/cmd/duffle/main.go index 2335f075..e8b0816b 100644 --- a/cmd/duffle/main.go +++ b/cmd/duffle/main.go @@ -8,15 +8,14 @@ import ( "runtime" "strings" - "github.com/deislabs/duffle/pkg/signature" - + "github.com/deislabs/cnab-go/bundle" "github.com/spf13/cobra" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/claim" "github.com/deislabs/duffle/pkg/credentials" "github.com/deislabs/duffle/pkg/driver" "github.com/deislabs/duffle/pkg/duffle/home" + "github.com/deislabs/duffle/pkg/signature" "github.com/deislabs/duffle/pkg/utils/crud" ) diff --git a/cmd/duffle/main_test.go b/cmd/duffle/main_test.go index f0312864..d1de0e05 100644 --- a/cmd/duffle/main_test.go +++ b/cmd/duffle/main_test.go @@ -7,11 +7,10 @@ import ( "testing" "github.com/deislabs/cnab-go/bundle" - "github.com/deislabs/duffle/pkg/credentials" - "github.com/ghodss/yaml" "github.com/stretchr/testify/assert" + "github.com/deislabs/duffle/pkg/credentials" "github.com/deislabs/duffle/pkg/duffle/home" ) diff --git a/cmd/duffle/pull.go b/cmd/duffle/pull.go index fe9d2f3a..a41a6e8c 100644 --- a/cmd/duffle/pull.go +++ b/cmd/duffle/pull.go @@ -11,10 +11,11 @@ import ( "strings" "github.com/deislabs/cnab-go/bundle" - "github.com/deislabs/duffle/pkg/loader" - "github.com/deislabs/duffle/pkg/reference" "github.com/docker/cnab-to-oci/remotes" "github.com/spf13/cobra" + + "github.com/deislabs/duffle/pkg/loader" + "github.com/deislabs/duffle/pkg/reference" ) var ErrNotSigned = errors.New("bundle is not signed") diff --git a/cmd/duffle/push.go b/cmd/duffle/push.go index bbe3c803..f4d9506e 100644 --- a/cmd/duffle/push.go +++ b/cmd/duffle/push.go @@ -10,10 +10,11 @@ import ( "os" sdkBundle "github.com/deislabs/cnab-go/bundle" - "github.com/deislabs/duffle/pkg/reference" "github.com/docker/cli/cli/config" "github.com/docker/cnab-to-oci/remotes" "github.com/spf13/cobra" + + "github.com/deislabs/duffle/pkg/reference" ) type pushOptions struct { @@ -24,7 +25,7 @@ type pushOptions struct { } func newPushCmd(out io.Writer) *cobra.Command { - const usage = `Pushes a CNAB bundle to a repository.` + // const usage = `Pushes a CNAB bundle to a repository.` var opts pushOptions cmd := &cobra.Command{ diff --git a/cmd/duffle/root_test.go b/cmd/duffle/root_test.go index 39412b3b..04a673fe 100644 --- a/cmd/duffle/root_test.go +++ b/cmd/duffle/root_test.go @@ -11,6 +11,7 @@ import ( "testing" "github.com/deislabs/cnab-go/bundle" + "github.com/deislabs/duffle/pkg/version" ) diff --git a/cmd/duffle/search.go b/cmd/duffle/search.go index bc81796e..49b1b44f 100644 --- a/cmd/duffle/search.go +++ b/cmd/duffle/search.go @@ -7,11 +7,11 @@ import ( "net/url" "strings" + "github.com/deislabs/cnab-go/bundle" "github.com/renstrom/fuzzysearch/fuzzy" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/repo/remote" ) diff --git a/cmd/duffle/upgrade_test.go b/cmd/duffle/upgrade_test.go index 4245bfe8..02ce89cb 100644 --- a/cmd/duffle/upgrade_test.go +++ b/cmd/duffle/upgrade_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/deislabs/cnab-go/bundle" + "github.com/deislabs/duffle/pkg/claim" ) diff --git a/pkg/action/action.go b/pkg/action/action.go index 95029419..0eec8ef1 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/deislabs/cnab-go/bundle" + "github.com/deislabs/duffle/pkg/claim" "github.com/deislabs/duffle/pkg/credentials" "github.com/deislabs/duffle/pkg/driver" diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 1e333f7a..51e086f7 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -9,11 +9,11 @@ import ( "time" "github.com/deislabs/cnab-go/bundle" + "github.com/stretchr/testify/assert" + "github.com/deislabs/duffle/pkg/claim" "github.com/deislabs/duffle/pkg/credentials" "github.com/deislabs/duffle/pkg/driver" - - "github.com/stretchr/testify/assert" ) type mockFailingDriver struct { diff --git a/pkg/action/run_custom_test.go b/pkg/action/run_custom_test.go index d60d97d0..825cfa4e 100644 --- a/pkg/action/run_custom_test.go +++ b/pkg/action/run_custom_test.go @@ -6,10 +6,10 @@ import ( "time" "github.com/deislabs/cnab-go/bundle" + "github.com/stretchr/testify/assert" + "github.com/deislabs/duffle/pkg/claim" "github.com/deislabs/duffle/pkg/driver" - - "github.com/stretchr/testify/assert" ) func TestRunCustom(t *testing.T) { diff --git a/pkg/builder/builder.go b/pkg/builder/builder.go index f4ed0a85..0acdbe78 100644 --- a/pkg/builder/builder.go +++ b/pkg/builder/builder.go @@ -11,9 +11,9 @@ import ( "time" "github.com/Masterminds/semver" + "github.com/deislabs/cnab-go/bundle" "github.com/pkg/errors" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/duffle/manifest" "github.com/deislabs/duffle/pkg/imagebuilder" ) diff --git a/pkg/builder/builder_test.go b/pkg/builder/builder_test.go index 818694ac..a7d7d983 100644 --- a/pkg/builder/builder_test.go +++ b/pkg/builder/builder_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/deislabs/cnab-go/bundle" + "github.com/deislabs/duffle/pkg/duffle/manifest" "github.com/deislabs/duffle/pkg/imagebuilder" ) diff --git a/pkg/claim/claimstore_test.go b/pkg/claim/claimstore_test.go index 8da62871..af352c96 100644 --- a/pkg/claim/claimstore_test.go +++ b/pkg/claim/claimstore_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" + "github.com/deislabs/cnab-go/bundle" "github.com/stretchr/testify/assert" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/utils/crud" ) diff --git a/pkg/loader/loader.go b/pkg/loader/loader.go index 5e05e486..5865afaa 100644 --- a/pkg/loader/loader.go +++ b/pkg/loader/loader.go @@ -2,6 +2,7 @@ package loader import ( "github.com/deislabs/cnab-go/bundle" + "github.com/deislabs/duffle/pkg/signature" ) diff --git a/pkg/loader/secure_loader.go b/pkg/loader/secure_loader.go index 3e2018e6..7974af6c 100644 --- a/pkg/loader/secure_loader.go +++ b/pkg/loader/secure_loader.go @@ -2,6 +2,7 @@ package loader import ( "github.com/deislabs/cnab-go/bundle" + "github.com/deislabs/duffle/pkg/signature" ) diff --git a/pkg/packager/export.go b/pkg/packager/export.go index 9cd6bd14..a4c79e9d 100644 --- a/pkg/packager/export.go +++ b/pkg/packager/export.go @@ -9,11 +9,11 @@ import ( "strings" "time" + "github.com/deislabs/cnab-go/bundle" "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/docker/pkg/archive" - "github.com/deislabs/cnab-go/bundle" "github.com/deislabs/duffle/pkg/loader" )