@@ -32,13 +32,15 @@ import (
3232)
3333
3434var (
35- dockerCmd * cobra.Command
36- attachCmd * cobra.Command
37- buildxCmd * cobra.Command
38- buildxBuildCmd * cobra.Command
39- buildxDialStdioCmd * cobra.Command
40- buildxInstallCmd * cobra.Command
41- buildxStopCmd * cobra.Command
35+ dockerCmd * cobra.Command
36+ attachCmd * cobra.Command
37+ buildxCmd * cobra.Command
38+ buildxBuildCmd * cobra.Command
39+ buildxDialStdioCmd * cobra.Command
40+ buildxImagetoolsCmd * cobra.Command
41+ buildxImagetoolsCreateCmd * cobra.Command
42+ buildxInstallCmd * cobra.Command
43+ buildxStopCmd * cobra.Command
4244)
4345
4446//nolint:errcheck
@@ -97,6 +99,17 @@ func setup() {
9799 Args : cobra .NoArgs ,
98100 Run : func (* cobra.Command , []string ) {},
99101 }
102+ buildxImagetoolsCmd = & cobra.Command {
103+ Use : "imagetools" ,
104+ Short : "Commands to work on images in registry" ,
105+ Run : func (* cobra.Command , []string ) {},
106+ Hidden : true ,
107+ }
108+ buildxImagetoolsCreateCmd = & cobra.Command {
109+ Use : "create [OPTIONS] [SOURCE...]" ,
110+ Short : "Create a new image based on source images" ,
111+ Run : func (* cobra.Command , []string ) {},
112+ }
100113 buildxInstallCmd = & cobra.Command {
101114 Use : "install" ,
102115 Short : "Install buildx as a 'docker builder' alias" ,
@@ -223,6 +236,8 @@ format: "default|<id>[=<socket>|<key>[,<key>]]"`)
223236
224237 buildxCmd .AddCommand (buildxBuildCmd )
225238 buildxCmd .AddCommand (buildxDialStdioCmd )
239+ buildxImagetoolsCmd .AddCommand (buildxImagetoolsCreateCmd )
240+ buildxCmd .AddCommand (buildxImagetoolsCmd )
226241 buildxCmd .AddCommand (buildxInstallCmd )
227242 buildxCmd .AddCommand (buildxStopCmd )
228243 dockerCmd .AddCommand (buildxCmd )
@@ -233,6 +248,11 @@ func TestGenAllTree(t *testing.T) {
233248 setup ()
234249 tmpdir := t .TempDir ()
235250
251+ // keep for testing
252+ //tmpdir, err := os.MkdirTemp("", "cli-docs-tools")
253+ //require.NoError(t, err)
254+ //t.Log(tmpdir)
255+
236256 epoch , err := time .Parse ("2006-Jan-02" , "2020-Jan-10" )
237257 require .NoError (t , err )
238258 t .Setenv ("SOURCE_DATE_EPOCH" , strconv .FormatInt (epoch .Unix (), 10 ))
0 commit comments