working commit

This commit is contained in:
2026-03-26 21:08:25 +02:00
parent 80fdd79aff
commit 31fcdca726
6 changed files with 77 additions and 60 deletions
+12 -11
View File
@@ -16,12 +16,6 @@ import (
)
type Util struct {
// TODO: delete mixed object and use simple object?
accountcmd.AccountUtil
filecmd.FileUtil
imagecmd.ImageUtil
accountcmd.GrantUtil
rootCmd *cobra.Command
}
@@ -43,11 +37,18 @@ func (util *Util) Build() error {
}
rootCmd.CompletionOptions.DisableDefaultCmd = true
rootCmd.AddCommand(util.MakeFileCmds())
rootCmd.AddCommand(util.MakeCollectionCmds())
rootCmd.AddCommand(util.CreateImageCmds())
rootCmd.AddCommand(util.MakeAccountCmds())
rootCmd.AddCommand(util.MakeGrantCmds())
fileUtil := filecmd.NewFileUtil()
rootCmd.AddCommand(fileUtil.MakeFileCmds())
rootCmd.AddCommand(fileUtil.MakeCollectionCmds())
imageUtil := imagecmd.NewImageUtil()
rootCmd.AddCommand(imageUtil.CreateImageCmds())
accountUtil := accountcmd.NewAccountUtil()
rootCmd.AddCommand(accountUtil.MakeAccountCmds())
grantUtil := accountcmd.NewGrantUtil()
rootCmd.AddCommand(grantUtil.MakeGrantCmds())
util.rootCmd = rootCmd