Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 2475ad2

Browse files
silvin-lubeckichris-crone
authored andcommitted
Move all the commands to their own package internal/commands so they can be re-used by another binary.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
1 parent ac854b9 commit 2475ad2

22 files changed

Lines changed: 26 additions & 27 deletions

cmd/docker-app/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"github.com/docker/app/internal"
5+
app "github.com/docker/app/internal/commands"
56
"github.com/docker/cli/cli-plugins/manager"
67
"github.com/docker/cli/cli-plugins/plugin"
78
"github.com/docker/cli/cli/command"
@@ -10,7 +11,7 @@ import (
1011

1112
func main() {
1213
plugin.Run(func(dockerCli command.Cli) *cobra.Command {
13-
return newRootCmd(dockerCli)
14+
return app.NewRootCmd("app", dockerCli)
1415
}, manager.Metadata{
1516
SchemaVersion: "0.1.0",
1617
Vendor: "Docker Inc.",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"bytes"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"testing"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"fmt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"bytes"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"github.com/docker/app/internal/packager"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"github.com/deislabs/duffle/pkg/action"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"fmt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"fmt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"fmt"

0 commit comments

Comments
 (0)