controller: move controllers out of commands into separate package

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-01-31 16:39:57 +00:00
parent cb94298a02
commit a9fd128910
19 changed files with 580 additions and 454 deletions

View File

@ -4,6 +4,7 @@ import (
"os"
imagetoolscmd "github.com/docker/buildx/commands/imagetools"
"github.com/docker/buildx/controller/remote"
"github.com/docker/buildx/util/logutil"
"github.com/docker/cli-docs-tool/annotation"
"github.com/docker/cli/cli"
@ -87,7 +88,7 @@ func addCommands(cmd *cobra.Command, dockerCli command.Cli) {
imagetoolscmd.RootCmd(dockerCli, imagetoolscmd.RootOptions{Builder: &opts.builder}),
)
if isExperimental() {
addControllerCommands(cmd, dockerCli, opts)
remote.AddControllerCommands(cmd, dockerCli)
}
}