diff --git a/api/backend/backend.go b/api/backend/backend.go index 54d1b1ac..776d0c9b 100644 --- a/api/backend/backend.go +++ b/api/backend/backend.go @@ -17,9 +17,10 @@ package backend import ( + "github.com/docker/compose/v2/pkg/api" + "github.com/docker/compose-ecs/api/secrets" "github.com/docker/compose-ecs/api/volumes" - "github.com/docker/compose/v2/pkg/api" ) var instance Service diff --git a/cli/cmd/secrets.go b/cli/cmd/secrets.go index 03631a2e..71191c61 100644 --- a/cli/cmd/secrets.go +++ b/cli/cmd/secrets.go @@ -22,10 +22,10 @@ import ( "os" "github.com/docker/compose-ecs/api/backend" + "github.com/docker/compose-ecs/api/secrets" "github.com/docker/compose/v2/cmd/formatter" - "github.com/spf13/cobra" - "github.com/docker/compose-ecs/api/secrets" + "github.com/spf13/cobra" ) // SecretCommand manage secrets diff --git a/cli/cmd/version.go b/cli/cmd/version.go index fa868eb3..aafa2902 100644 --- a/cli/cmd/version.go +++ b/cli/cmd/version.go @@ -19,7 +19,6 @@ package cmd import ( "fmt" - "github.com/docker/cli/cli" "github.com/spf13/cobra" "github.com/docker/compose-ecs/internal" @@ -34,10 +33,7 @@ func VersionCommand() *cobra.Command { Short: "Show the Docker version information", Args: cobra.MaximumNArgs(0), RunE: func(cmd *cobra.Command, _ []string) error { - err := runVersion(cmd) - if err != nil { - return cli.StatusError{StatusCode: 1, Status: err.Error()} - } + runVersion() return nil }, } @@ -48,11 +44,10 @@ func VersionCommand() *cobra.Command { return cmd } -func runVersion(cmd *cobra.Command) error { +func runVersion() { if formatOpt == "json" { fmt.Printf("{\"version\":%q}\n", internal.Version) } else { fmt.Printf("Compose ECS %s\n", internal.Version) } - return nil } diff --git a/cli/cmd/volume/list.go b/cli/cmd/volume/list.go index 89b790a5..f27875c4 100644 --- a/cli/cmd/volume/list.go +++ b/cli/cmd/volume/list.go @@ -22,11 +22,10 @@ import ( "os" "github.com/docker/compose-ecs/api/backend" - formatter2 "github.com/docker/compose/v2/cmd/formatter" + "github.com/docker/compose-ecs/api/volumes" + "github.com/docker/compose/v2/cmd/formatter" "github.com/spf13/cobra" - - "github.com/docker/compose-ecs/api/volumes" ) type listVolumeOpts struct { @@ -53,14 +52,14 @@ func listVolume() *cobra.Command { return nil } view := viewFromVolumeList(vols) - return formatter2.Print(view, opts.format, os.Stdout, func(w io.Writer) { + return formatter.Print(view, opts.format, os.Stdout, func(w io.Writer) { for _, vol := range view { _, _ = fmt.Fprintf(w, "%s\t%s\n", vol.ID, vol.Description) } }, "ID", "DESCRIPTION") }, } - cmd.Flags().StringVar(&opts.format, "format", formatter2.PRETTY, "Format the output. Values: [pretty | json]. (Default: pretty)") + cmd.Flags().StringVar(&opts.format, "format", formatter.PRETTY, "Format the output. Values: [pretty | json]. (Default: pretty)") cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only display IDs") return cmd } diff --git a/ecs/e2e/ecs/e2e-ecs_test.go b/ecs/e2e/ecs/e2e-ecs_test.go index 56f6a930..58482bb3 100644 --- a/ecs/e2e/ecs/e2e-ecs_test.go +++ b/ecs/e2e/ecs/e2e-ecs_test.go @@ -32,8 +32,6 @@ import ( "gotest.tools/v3/poll" ) -var binDir string - func TestSecrets(t *testing.T) { startTime := strconv.Itoa(int(time.Now().UnixNano())) secretName := "secret" + strings.ToLower(t.Name()) + startTime diff --git a/go.mod b/go.mod index 6e09ab51..fd1d86b9 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/hashicorp/go-uuid v1.0.3 github.com/iancoleman/strcase v0.2.0 github.com/joho/godotenv v1.3.0 - github.com/labstack/echo v3.3.10+incompatible github.com/opencontainers/go-digest v1.0.0 github.com/pkg/errors v0.9.1 github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b @@ -80,7 +79,6 @@ require ( github.com/json-iterator/go v1.1.11 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/klauspost/compress v1.11.13 // indirect - github.com/labstack/gommon v0.4.0 // indirect github.com/mailru/easyjson v0.7.0 // indirect github.com/mattn/go-colorable v0.1.11 // indirect github.com/mattn/go-isatty v0.0.14 // indirect @@ -114,8 +112,6 @@ require ( github.com/theupdateframework/notary v0.6.1 // indirect github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 // indirect github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect - github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect diff --git a/go.sum b/go.sum index 234a99a1..c7d16fb7 100644 --- a/go.sum +++ b/go.sum @@ -761,10 +761,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28/go.mod h1:T/T7jsxVqf9k/zYOqbgNAsANsjxTd1Yq3htjDhQ1H0c= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg= -github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= -github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= -github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/lib/pq v0.0.0-20180201184707-88edab080323/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1100,11 +1096,8 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= @@ -1427,7 +1420,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=